We know from history and from scripture that there were 3 special "pilgrimage festivals" in the year, when Jews all had to come to Jerusalem. Passover, Pentecost and Feast of Booths/Sukkot, and this is important because it answers your question as to the role of the money changers. Much like the countries in Europe, you can travel a few hours and be in three different countries, with a totally different language, culture and currency. Jews living in another region would have to get their money changed into local currency, as well as the Roman state tax. I never understood the importance of Kantors (money changers) until I lived in Central Europe. In addition to the Jews from other regions, there were also foreigners [Gentiles] and this leads us to the The other, most important reason for Jesus's righteous anger toward the money changers is given to us in 2 places in scripture, but it is often missed.
It wasn't WHAT the money changers did that angered Christ, it was WHERE they did it.
I also agree that these money changers charged extra commissions, and were cheating the people, but that's more like the 1/2 teaspoon of salt in the cake.
The money changers were both legal and necessary.
Remember the Pharisees were experts in finding 'loopholes' in the law, so that they would technically be following the legal letter of the law, but really, in their hearts they were breaking the law.
So we have to look outside the gospels to find the clue we need.
It's found in Isaiah 56:7 and Christ actually quotes part of this passage in one gospel account. It's so fascinating. The chapter heading for Isaiah 56 is "Salvation for Foreigners".
I will bring them to my Holy Mountain and make them joyful in My house of prayer. Their burnt offerings and sacrifices will be accepted on My altar, for My house will be called a house of prayer for all the nations." - Isaiah 56:7
The story of Jesus cleansing the temple is in several gospels, but only in the Gospel of Mark, we find the other missing piece that solves the riddle. It's in Mark 11:17. In this passage, Christ actually quotes the passage from Isaiah . "And he was teaching them and saying to them, 'Is it not written, My house shall be called a house of prayer for all the nations, but you have made it a den of robbers."
The temple in Jerusalem had three main sections [besides the holy place, only for priests]. There was the outer court, which was the court of the Gentiles, the court of women, and the court for Jewish males. The money changers set up their tables like a giant Flea Market in the court of the Gentiles - blocking the nations from worshiping like God intended.
It wasn't WHAT the money changers did that angered Christ, it was WHERE they did it.
The Pharisees didn't even realize it, but this act of cleansing the temple actually fulfilled a prophecy about the Messiah, written hundreds of years before Christ. Zeal for Your house [his Father's house] will consume Me. Psalm 69:9