Why are golf carts street legal in neighborhoods but ATVs are not?

How come I can't drive my four wheeler, but everyone is allowed to drive these golf carts all over? Back when I grew up, dont even think the golf carts were allowed. Now I live in a more rural area, and cops dont really care if you only stay on the 30 mph back roads, but in this case im talking about urban neighborhoods

Why are golf carts street legal in neighborhoods but ATVs are not?
Post Opinion