Why was Jesus upset with the Pharisees who were asking for a sign?

Mt 12:

38 Some of the Pharisees and teachers of the law said to him, “Teacher, we want to see a sign from you.”

They demanded a miracle.

39 He answered, “A wicked and adulterous generation asks for a sign! But none will be given it except the sign of the prophet Jonah.

They had already witnessed numerous signs and miracles performed by Jesus, such as healing the sick and casting out demons (Mt 8:16). Despite this, they demanded yet another sign, revealing their hardened hearts and refusal to believe.

They had ulterior motives. Mk 8:

11 The Pharisees came and began to question Jesus. To test him, they asked him for a sign from heaven. 12 He sighed deeply and said, “Why does this generation ask for a sign? Truly I tell you, no sign will be given to it.”

He warned them against seeking signs for the wrong reasons and a call to genuine faith and repentance. Faith does not rely on constant miraculous proofs but trusts in God's word and his promises. J 20:

29 Jesus said to [Thomas], “Because you have seen Me, you have believed; blessed are those who have not seen and yet have believed.”

That's true faith.

Why was Jesus upset with the Pharisees who were asking for a sign?

Jesus was upset with the Pharisees because their request for a sign was not a sincere inquiry but a manipulative attempt to undermine him. It revealed their lack of faith, their hypocrisy, and their hardened hearts. Jesus' refusal to grant their request served as a testament to their spiritual condition and their rejection of the truth.