You are making the mistake of superimposing our current culture overtop of that of older cultures.
In this case, your question doesn't really make sense (in the context of the times).
- Inactivity was almost non-existent in ancient times. There was constant work for almost everyone but royalty. So, there was nothing for them to notice a correlation with.
- Obesity was also rather rare in ancient times. Throughout hundreds of thousands of years of human existence, food has almost always been scarce (and even when it was abundant, you had spoilage problems - not to mention winter, when all the food just seems to disappear for months on end).
- Because of #2, obesity has almost always been sought after by humans. Being fat meant that you ate well (something rare and valuable). People were proud of being fat. It was a sign of wealth. It showed others that you were wealthy enough to eat very well.
- We typically consider 'fatty foods' to be deep fried. But, not all ancient cultures had frying technology.
In ancient times, obesity wasn't the problem it's seen as today. In fact, it was something to be sought after. They wouldn't have cared what caused it (other than to use that knowledge to make themselves fatter).