Why do people put sugar in alot of food
Are you channeling your best self with this comment? (If you're not sure, check out our Code of Conduct.)
Because sugar tastes good to us.
Historically speaking sugar wasn't a terribly easy thing to get, but it is a good signal to your body that a food is high in calories, which it needs in order to survive, so sugar tastes good, because the people who ate a lot of sweet things when they were available were better at surviving the winter and passing on their genes.
In prepared foods it's also used to cover up other flavors and as a flavor corrector. Semi-ripe tomatoes don't make a very good pasta sauce, but sugar helps correct the flavor.