Why is fasting allowed in Buddhism? One of the answers to this question 'Is there a tradition or practice involving fasting in Buddhism or Buddhist countries?' says that fasting is followed by Tibetan Buddhists.

Why is fasting allowed since it is as extreme as gluttony and not a middle way? If I am right, following the path of the śramaṇic and yogic systems which existed at the time of Gautama Buddha, he subjected his body to extremes such as fasting and then realized that such extremes do not help in his enlightenment.

Has the Buddha prohibited fasting in any of his teachings?
There are a lot of scientifically proven benefits of fasting for short periods of time.

Within the earliest form of Buddhism, fasting after noon is recommended way of life.

This means they would get done with the "taking care of the body" part of their life out of the way early and can devote the most time to what is truly important: spiritual cultivation.

This is a fast of 16 hours. On the other hand, very long fasts that are weeks long is not the Middle Way and Buddha recommended against that.

Eating 3 meals a day is actually falling further on the opposite spectrum: eating too much, so be wary.