Morality is a ghost, a figment. Morality does not stand on its own, it is the flavour of the day, the fad of the month or the pet rock of the week.
Laws are sometimes used to give morality body, to give it a physical dimension. It is not enough to know that if you live together without marriage you will be punished by god, you must be punished by man too.
I have said it before and will say it again, as an example...
It is not immoral of me to take a dump in your swimming pool. It is unhealthy, ignorant, frowned upon, illegal, dispicable, confrontational and all the other tags you care to put on it but it is not immoral.
Some laws grow out of a desire to force morality on others, most are from a desire to protect those that need protection, that they may operate within society.