John 2:14

In the temple courts he found men selling cattle, sheep and doves, and others sitting at tables exchanging money.

The selling of animals in the Temple was for the convenience of having the prescribed sacrifices available for those who came from afar.  The moneychangers had a trade because monetary offerings could only be made in approved currency. Peterson calls them “loan sharks.”  This all occurred in the Court of the Gentiles.