We fast for three reasons:
To check the desires of the flesh. So saint Paul says in fastings, in chastity (2 Cor 6:5), meaning that fasting is a safeguard for chastity. As Saint Jerome says, “Without Ceres, and Bacchus, Venus would freeze,” as much as to say that lust loses its heat through spareness of food and drink.
That the mind may more freely raise itself to contemplation of the heights. We read in the book of Daniel that it was after a fast of three weeks that he received the revelation from God (Dn 10:2-4).
To make satisfaction for sin. This is the reason given by the prophet Joel, Be converted to me with all your heart, in fasting and in weeping and in mourning (Jl 2:12). And here is what Saint Augustine writes on the matter. “Fasting purifies the soul. It lifts up the mind, and it brings the body into subjection to the spirit. It makes the heart contrite and humble, scatters the clouds of desire, puts out the flames of lust, and enkindles the true light of chastity.”
There is a commandment laid on us to fast. For fasting helps to destroy sin, and to raise the mind to thoughts of the spiritual world. Each man is then bound, by the natural law of the matter, to fast just as much as is necessary to help him in these matters. Which is to say that fasting in general is a matter of natural law.