Often, we hear pragmatic explanations of fasting, to try and make it more acceptable to a modern “consciousness,” such as “we fast to save money to give more to the poor.” While that certainly has some grounding in Tradition, it is not the principle reason for fasting. Fasting and self-denial are about recognizing that this is not our true home.
It is a serious thing to live in a society of possible gods and goddesses, to remember that the dullest most uninteresting person you talk to may one day be a creature which,if you say it now, you would be strongly tempted to worship, or else a horror and a corruption such as you now meet, if at all, only in a nightmare. All day long we are, in some degree helping each other to one or the other of these destinations. It is in the light of these overwhelming possibilites, it is with the awe and the circumspection proper to them, that we should conduct all of our dealings with one another, all friendships, all loves, all play, all politics. There are no ordinary people. You have never talked to a mere mortal. nations, cultures, arts, civilizations – These are mortal, and their life is to ours as the life of a gnat. But it is immortals whom we joke with, work with, marry, snub, and exploit – immortal horrors or everlasting splendors. (C. S. Lewis, “The Weight of Glory”)
It is about recognizing that we are, ultimately, immortal, and that we must not become attached to temporary things like electric lighting and seek reward in this life.
 Take heed that you do not your justice before men, to be seen by them: otherwise you shall not have a reward of your Father who is in heaven.  Therefore when thou dost an almsdeed, sound not a trumpet before thee, as the hypocrites do in the synagogues and in the streets, that they may be honoured by men. Amen I say to you, they have received their reward.  But when thou dost alms, let not thy left hand know what thy right hand doth.  That thy alms may be in secret, and thy Father who seeth in secret will repay thee.  And when ye pray, you shall not be as the hypocrites, that love to stand and pray in the synagogues and corners of the streets, that they may be seen by men: Amen I say to you, they have received their reward. (Matthew 6:1-5, Douay-Rheims).
We deny ourselves to imitate Jesus,
 Who being in the form of God, thought it not robbery to be equal with God:  But emptied himself, taking the form of a servant, being made in the likeness of men, and in habit found as a man.  He humbled himself, becoming obedient unto death, even to the death of the cross. (Philippians 2:6-8, Douay-Rheims)
To imitate Jesus, we must so empty ourselves and take the form of slaves:
 Jesus saith to him: If thou wilt be perfect, go sell what thou hast, and give to the poor, and thou shalt have treasure in heaven: and come follow me.  And when the young man had heard this word, he went away sad: for he had great possessions.  Then Jesus said to his disciples: Amen, I say to you, that a rich man shall hardly enter into the kingdom of heaven.  And again I say to you: It is easier for a camel to pass through the eye of a needle, than for a rich man to enter into the kingdom of heaven.  And when they had heard this, the disciples wondered very much, saying: Who then can be saved? (Matthew 19:21-25, Douay).
This is why prayer is more effective when accompanied by fasting, as Our Lord teaches:
 Jesus said to them: Because of your unbelief. For, amen I say to you, if you have faith as a grain of mustard seed, you shall say to this mountain, Remove from hence hither, and it shall remove; and nothing shall be impossible to you. But this kind is not cast out but by prayer and fasting. (Matthew 17:19-20, Douay)