It's impossible in many states for gays to marry.
This one should be obvious. Old religious and cultural morality deems homosexuality immoral. I don't agree, and since you bring it up I assume you don't either, but many people still do.
Arguably, Marijuana isn't immoral and is still illegal to smoke in many places.
Many people consider Marijuana to be to be either dangerous or immoral. Dangerous, not only to the person who does it, but to the the surrounding individuals as well, as they argue it lowers perception and and looses inhibitions, making people more likely to do other criminal acts than they would otherwise. It may always not be true, but the anti-Marijuana machine has been working for a long time now, and many people are not clear on what effects Marijuana actually has, and are led to assume the worst. Many people I've argued about legalisation with, for example, thinks Marijuana is a direct cause of psychosis. Thus, it is moral for them to want it banned, similarly to how they want heavier drugs banned because of the danger to society they think they are.
You can't park on the left side of Main Street in my town when it's been raining for more than a day.
I have absolutely no way of knowing why they would make this law, I can't even know whether it is a lie or not unless you prove to me that it is true. Still, though the law definitely seems silly out of context, I doubt they would legislate such a thing without reason, it might even be a "leftover" law that had a purpose once, but does no more.
Still, I could make all kinds of guesses concerning why such a law would be justified or even needed, most including plumbing and or access to sewers/related stuff. They basically come down to it being immoral to complicate the work of public/state institutions who might need access (because they are needed for the benefit of the majority of citizens) and thus a fine (or whatever) is ordained for such behaviour. Just like with other parking laws.
It is a bit useless for me to guess about without knowing any of the circumstances, however, so I really shouldn't try to elaborate any further on it. Furthermore, your example is not much more than an anecdote, and just because I cannot prove the morals behind it does not make it not based on morality. It is similar to situation where X claims religious miracles healing cancer or any other disease is just humbug and fake, and Y answers that his uncle was cured by laying on of hands. X cannot with certainty (beyond belief) say it wasn't so, but that does not make Y right.
Lastly, though, I should say that it was wrong of me to say that "all" laws are based on morality. Of course there's going to be particular examples that wasn't, such is always the case with definitive statements. I take that back. I do however insist that most laws were. Restrictions of our actions are (in most cases
) there because other people don't find those actions proper or fair, not because the government ungroundedly decided that you can't do that "just because".
It may not be
your morals, but everyone does not go by the same beliefs.
Prepostual edit: Ninja'd by eddieboy. Though he says the same in a much less long-winded way, I'm posting it anyway.