These commercial activities that upset Jesus were being conducted in an outer court of the Jewish, temple during the observance of the Passover in Jerusalem.
All male Jews were expected to attend this festival, even if they lived a long distance from Jerusalem (Exod 23:17). The money changers were probably exchanging foreign coins of these pilgrims for the appropriate coins with which to pay the temple tax (Matt 17:24).
These pilgrims were also expected to provide animals for sacrifice on the altar of the temple during this celebration. Merchants were selling animals for this purpose as a convenience so pilgrims would not have to bring along on their trip to the holy city.
Jesus was angry about the crass commercialism of the scene. Temple officials may have been profiting personally from the buying and selling. He quoted Isaiah 56:7, saying, “Mine house shall be called an house of prayer,” and accused the merchants of defiling the temple: “But ye have made it a den of thieves” (Matt 21:13)
MATTHEW 21:12 – Jesus went into the temple . . .and cast out all them that sold and bought in the temple, and overthrew the tables of the moneychangers, and the seats [benches, NIV] of them that sold doves.