Saying "it's a good thing" doesn't necessarily imply morality to me. In some cases "good" can mean nothing more than beneficial.Saying "I think it's a good thing that private property is protected, so let's create a law to do that" is basing it on morality. You can justify it in a multitude of other ways, but that's how it came about.
I feel like you're arguing against religion in law and I agree. I'm pretty much amoral in general, anyway, but just because I'm not a huge fan of morality doesn't mean it's not what a society (any society's) laws are based upon.
And I do acknowledge that there is a moral component to our laws, I do not think their purpose is in any way to ensure that people behave in a moral manner. I think the preamble to the constitution does a pretty good job of describing the purpose of our legal system and nothing in there can be described as saying the purpose of the law is to ensure that people adhere to a particular moral code.