However, in that case the moneychangers were taking the peoples money for their own use.
As I understand it, and I may very well be wrong, the temple only took one kind of coin as an offering. The money changers had lots of these coins which they exchanged at a big profit to themselves. Oddly, there used to be a similar scam that involved Mexican parking meters. It took a small coin that had disappeared from circulation. The guys who would watch you car for a dollar or two, had plenty of them, which were worth a nickel or so. But it was better than getting your license plate removed by the cops.
.... The money changers had lots of these coins which they exchanged at a big profit to themselves...
That’s right. The money changers made money on the discount rate. Foreign currency transactions today work the same way.