Jesus focuses now on the gift of fasting, a spiritual discipline, that God gives to his people. The model prayer that Jesus instructs is accompanied by the act of fasting. Not all prayers must include fasting, but the biblical mandate of fasting will always be accompanied by prayer.
As the hypocritical Pharisees and religious elite fake devotion to the Lord, Jesus continues his theme of genuine dependence upon the Father in Heaven over performance religion. His expectation is that the citizens of the Kingdom of Heaven will fast. "When you fast" [verse 16]. But when we fast, we do so with a purpose and that purpose must be in alignment with God's will.
Sometimes fasting is for the purpose of repentance and forgiveness.
Sometimes fasting is for the purpose of discerning God's will.
But fasting is always the avoidance of whatever we find ourselves over indulgence. Self indulgence is the enemy of thankfulness. It is the enemy of dependence upon God himself. When we deny our cravings, we depend upon God to fulfill our needs.