Why do we fast during Lent?

You probably noticed that on the First Sunday of Lent the Gospel talks about how Jesus went into the desert to be tempted after 40 days and nights of fasting.

The heart of Lent is about fasting and abstinence, but why do we fast?

St. Thomas Aquinas in his homily on the First Sunday of Lent explains very concisely the reasons for why we fast during Lent:

THE FIRST SUNDAY IN LENT.—(FROM THE GOSPEL)

“When He had fasted forty days and forty nights, He was afterward an hungered.”—Matt. 4:2.

S. AUGUSTINE says that it is the highest religion to imitate what we worship, so that, when Our Lord fasted, we ought to imitate Him in fasting. There are four reasons which ought to move us to fasting—firstly, the command of God; secondly, the example of Christ; thirdly, the manifold harm which befals those who do not fast; fourthly, the manifold benefits which come to them from fasting.

I. On the first head it is to be noted, that the Lord commanded us to fast in a fourfold manner—(1) By Himself, to Adam and Eve in Paradise, when He commanded that they should fast—i.e., abstain from the tree of knowledge of good and evil, and eat it not. (2) He commanded it by the Law of Moses: Lev. 16:31, “It shall be a Sabbath of rest unto you, and ye shall afflict your souls by a statute for ever.” (3) God commanded it by the Prophets: Joel 2:15, “Sanctify a fast.” (4) God commanded it by the Apostles: 2 Cor. 11:27, “In hunger and thirst, in fastings often”—whence he is a manifest transgressor of the precepts of grace who is unwilling to fast.

II. On the second head it is to be noted, that Our Lord taught us that there were four things necessary in fasting—(1) That we should be cleansed from all sin. (2) That we should conceal our fasting from the applause of men. (3) That we should fast with long-suffering and perseverance. (4) That we should overcome the temptations of the Devil. The first He taught in this, that He fasted when He was baptized; so also he who wishes to fast well He showed to us that when we fast and do good works we must hide ourselves from the praises of men: S. Matt. 6:16, “When ye fast, be not, as the hypocrites, of a sad countenance … that thou appear not unto men to fast.” The third He taught in this, that He fasted forty days and forty nights: S. Austin, “Subdue your flesh with abstinence from meat and drink as far as your health will permit.” The fourth He taught in this, that He did not give way to the temptation of the Devil: “Man shall not live by bread alone … Get thee hence, Satan;” Ecclus. 2:1, “Son, when thou comest to the service of God … prepare thy soul for temptation.”

III. On the third head it is to be noted, that four evils come upon those who are unwilling to fast when they ought—(1) The evil of iniquity: Ezek. 16:49, “Behold, this was the iniquity of thy sister Sodom, pride, fulness of bread.” (2) The evil of loss, for he who is not willing to fast will have to fast for ever from the fruit of eternal life; and this is indicated in Gen. 3:17, where it is recorded that Adam would not abstain from the forbidden fruit; wherefore the Lord said, “Now, lest he put forth his hand and take also of the tree of life … the Lord God sent him forth from the Garden of Eden.” (3) The evil of present punishment: Ecclus. 34:7, “By surfeiting many have perished.” (4) The evil of the punishment of perpetual hunger and thirst in the lower world: Isa. 65:13, “Behold, My servants shall eat, but ye shall be hungry: behold, My servants shall drink, but ye shall be thirsty”—which relates to the “heavenly feast,” from which they who do not fast now, but “fare sumptuously every day, shall not have a drop of water even” (see S. Luke 16:19–24).

IV. On the fourth head it is to be noted, that a fourfold profit flows from fasting—(1) The mortification of vices. (2) An elevation of the mind towards God. (3) The acquisition of virtue. (4) The reward of eternal blessedness. Of these four S. Gregory says: “If thou represseth vices by bodily fasting,” behold the first; “thou elevatest the mind,” behold the second; “thou increaseth virtue,” behold the third; “thou grantest rewards,” behold the fourth.

(Ninety-Nine Homilies of Saint Thomas Aquinas: Upon the Epistles and Gospels for Forty-Nine Sundays of the Christian Year – Saint Thomas Aquinas)

We see that Aquinas gives us 4 reasons for why we fast. God commanded it, Jesus did it, Not doing it is detrimental, doing it is beneficial.

I don't think there is anything more to add that what St. Thomas Aquinas has already said.

So, remember the words of Aquinas when you are fasting this Lent and remember the fasting of Jesus. We can use this time to draw closer to Christ through imitating His sufferings.