Christianity emerged from a Greek culture that was split between the following of Plato and Aristotle.Their difference came from Plato's belief that our souls are created before our bodies, while Aristotle believed that our souls and bodies were created together.
For its first thousand years Christianity was dominated by the Platonic belief that our souls are created before our bodies. Going along with that belief, there emerged the belief that our souls are captives of our bodies. This belief had holy people punishing their bodies to force them to release our souls from inprisonment. Early saints like St Anthony and St. Patrick were famous for punishing their bodies to make them release their souls
In 1100 the Christians at Cordova in Spain recovered the teachings of Aristotle that advices us to cultivate healthy bodies in heathy suls.