It's a matter of choosing which law to break.
Leave one's "out of gas" car by the side of the road (and get a ticket) or get some gas in a rationally constructed container.
I'd take the latter. It's less inconvenient.
Anyone stupid enough to run out of gas deserves whatever happens to them! If that is the car towed and you end up paying $1000+ to get it back...works for me, though I would suggest adding another $1000 moron surcharge on top of it!
A guy I know has to drive an hour to work. He left one day knowing he had plenty of gas to get there and planned to stop at a gas station before heading home. He lost his wallet that day and didn't have enough money to fill the car, but scrounged change in the center console and should have made it home okay. There was an accident and traffic had to be detoured on gravel roads, which took people quite a few miles out of their way. He ran out of gas about 2 miles from home and his wife had to buy some gas and go rescue him.
He's actually one of the smartest guys I know, but he's not perfect. Shit happens to people who aren't idiots.