I was hunting around for examples of dumb laws -- never mind why -- and found one that was just repealed.
For decades, Pekin, Illinois, said that drivers parking their cars on the street at night had to leave a light on. This led to many dead batteries in the morning, so the city just killed the requirement.
Some people complained that this means that people will feel more free and easy about keeping their cars parked outside at night.
If that's the goal (which I wouldn't support, personally), why not put up some "no parking 12:01 to 6 am" signs?