The discipline of fasting, like prayer, is meant to draw us nearer to God. When we abstain from food or drink, we engage in what Scot McKnight calls “body talk,” an embodied form of prayer.
Thus we can see why Jesus would be so critical of people who misuse fasting, or any spiritual discipline, by trying to get attention for it. The disciplines are meant to make us “pure in heart” before God. But showing off in front of others only shows how impure a person’s heart really is. And even if some people are fooled by a showoff, God is not fooled. If we are more interested in the attention of others than in our relationship with God, then our attention-seeking is an idol and makes a mockery of God.
Our spiritual practices are meant for God, for our relationship with him alone. So we should be careful in talking about them with other people or posting about them on social media. While there may be a genuine need to process or share experiences with others, we must guard our hearts against the temptation to turn others’ attention into an idol.