‘In Matthew 21, Jesus is in the temple preaching. The temple was the Jewish holy place, and the leaders of the temple did not take kindly to Jesus’ subversion of their own authority. They team up with the common religious teachers (the Pharisees) and approach Jesus demanding to know from where Jesus’ authority came:
Mat 21:23 Now when He came into the temple, the chief priests and the elders of the people confronted Him as He was teaching, and said, “By what authority are You doing these things? And who gave You this authority?” Mat 21:24 But Jesus answered and said to them, “I also will ask you one thing, which if you tell Me, I likewise will tell you by what authority I do these things: Mat 21:25 The baptism of John—where was it from? From heaven or from men?” And they reasoned among themselves, saying, “If we say, ‘From heaven,’ He will say to us, ‘Why then did you not believe him?’ Mat 21:26 But if we say, ‘From men,’ we fear the multitude, for all count John as a prophet.” Mat 21:27 So they answered Jesus and said, “We do not know.” And He said to them, “Neither will I tell you by what authority I do these things.
Jesus cannot answer the question in verse 23 without some sort of legal action taken against him. The high priest of that day and supreme authority on religious matters, and he could also make arrests in the vicinity of the temple. It is important for Jesus to avoid answering: answering that his authority was from God would lead to arrest and answering that it did not come from God would undermine his ministry. Instead, Jesus focuses the question towards John the Baptist (who is well regarded as authoritative by Israel’s common people). Jesus had not yet reached the height of John’s ministry, so Jesus opts to draw a parallel between himself and John the Baptist. John the Baptist was not given a commission to teach from the leaders of the temple, nor was Jesus. John the Baptist taught per God’s authority, so did Jesus. By using the reputation of John the Baptist (who was also critical of religious leaders), Jesus leverages John’s authority to undermine the temple. The leaders of the temple were very afraid of losing power by contradicting popular opinion.
Jesus takes this a step further and undermines the temple leaders in front of the temple worshipers. They despised John the Baptist, and Jesus uses this fact to condemn them:
Mat 21:28 “But what do you think? A man had two sons, and he came to the first and said, ‘Son, go, work today in my vineyard.’ Mat 21:29 He answered and said, ‘I will not,’ but afterward he regretted it and went. Mat 21:30 Then he came to the second and said likewise. And he answered and said, ‘I go, sir,’ but he did not go. Mat 21:31 Which of the two did the will of his father?” They said to Him, “The first.” Jesus said to them, “Assuredly, I say to you that tax collectors and harlots enter the kingdom of God before you. Mat 21:32 For John came to you in the way of righteousness, and you did not believe him; but tax collectors and harlots believed him; and when you saw it, you did not afterward relent and believe him.
This parable is directed at the temple leaders. The point Jesus is making is that evil people have a better chance of inheriting the kingdom of God than the temple leaders. This is a striking insult. The temple leaders prided themselves on their righteous acts and following the law. To Jesus, because the temple leaders were hypocrites and also did not believe John the Baptist, then they were worse than the people that they despised.
source: Chris Fisher (realityisnotoptional).