This is the naturalistic fallacy. Historically, people also lived in near starvation conditions, average lifespans were much shorter and a broken leg could be a death sentence.
If you apply the same logic to hunger, for example, even more people would be obese if they ate when they felt hungry, or if they followed their ancestors' instincts to gorge until full whenever the opportunity arose.
It's possible that we've historically survived in a local maxima of resource scarcity, and that "optimal" metabolic performance exists in a place beyond that, where resources are less scarce.