Our laws..
(Federal, State, and local)..are essentially based on historical English Common Law. That set of laws or codes evolved over the years and were based on the King's morality and to a lesser extent the morality of the landed gentry of the British empire.
All laws are essentially based on someone's or some group's morality. That is, based on the morality holding sway, through vote or persuasion, at the time the law was inacted. Then it follows that because all morality is subjective all laws are also to a large extent subjective.
That's why all secular laws can be changed by will of the people or their representatives (based on their current morality).
Just because a certain law does not reflect one person's morality doesn't mean it's not based on a morality.