6:16 Fasting in Israel involved going without food to engage in a spiritual exercise, usually prayer, with greater concentration. Fasting fostered and indicated self-humiliation before God, and confession often accompanied it (Neh. 9:1-2; Ps. 35:13; Isa. 58:3, 5; Dan. 9:2-20; 10:2-3; Jon. 3:5; Acts 9:9). People who felt anguish, danger, or desperation gave up eating temporarily to present some special petition to the Lord in prayer (Exod. 24:18; Judg. 20:26; 2 Sam. 1:12; 2 Chron. 20:3; Ezra 8:21-23; Esth. 4:16; Matt. 4:1-2; Acts 13:1-3; 14:23). Some pious believers fasted regularly (Luke 2:37). The Pharisees fasted twice a week (Luke 18:12). God only commanded the Israelites to fast on one day of the year, the day of Atonement (Lev. 16:29-31; 23:27-32; Num. 29:7). However during the Exile the Israelites instituted additional regular fasts (Zech. 7:3-5; 8:19). Fasting occurred in the early church and seems to have been a normal part of Christian self-discipline (1 Cor. 9:24-27; Phil. 3:19; 1 Pet. 4:3). Hypocritical fasting occurred in Israel long before Jesus' day (Isa. 58:1-7; Jer. 14:12; Zech. 7:5-6), but the Pharisees were notorious for it.
"Fasting emphasized the denial of the flesh, but the Pharisees were glorifying their flesh by drawing attention to themselves."328
Jesus' point in this verse was that His disciples should avoid drawing attention to themselves when they fasted. He did not question the genuine contrition of some who fasted, but He pointed out that the hypocrites wanted the admiration of other people even more than they wanted God's attention. Since that is what they really wanted, that is all they would get.
6:17-18 Jesus assumed His disciples would fast as He assumed they would give alms and pray. He said nothing to discourage them from fasting (cf. 9:14-17). He only condemned ostentatious fasting. To avoid any temptation to pander to the adulation of onlookers Jesus counselled His disciples to do nothing that would attract attention to the fact that they were fasting when they fasted. Again, the Father who sees the worship that His children render in secret will reward them.
The three major acts of Jewish worship--alms-giving, prayer, and fasting--were only representative of many other acts of worship that Jesus' disciples performed. His teaching in this section of the Sermon (6:1-18) stressed lessons they should apply more broadly. In His teaching about each of these three practices, Jesus first warned His disciples not to do the act for man's praise. Then He assured them that if they disregarded His warning they would get human praise but no more. Third, He taught them how to do the act secretly. Finally, He assured them that the Father who sees in secret would reward their righteous act openly. He thereby explained what it means to seek first the kingdom and its righteousness (6:33).