Each of the four gospels has the story of Jesus and the money-changers, John's story is earlier in Jesus' ministry, and the other three synoptic gospels place the money-changer story at Jesus' final Passover. The story itself seems out-of-place, Christ the Redeemer, losing his temper, losing his cool; Impossible! But that perspective isn't correct and first a little background on this passage.
In Jesus time, the Passover was one of the festivals in which Jews from all over the land, made the pilgrimage to the Holy Temple of Jerusalem. As part of the process of the pilgrims showing their humility and thankfulness to God, sacrifices and/or temple donations were mandated to the temple religious authorities. In Jesus' time, there was no common currency between distant communities; additionally it was considered a sacrilege to donate coinage with graven images (i.e. Roman coinage) as opposed to appropriate Jewish coinage so monies therefore had to be converted to conform to Temple policies. All of this seems both practical and reasonable. However, we read: "And Jesus went into the temple of God, and cast out all them that sold and bought in the temple, and overthrew the tables of the moneychangers, and the seats of them that sold doves, and said unto them, It is written, My house shall be called the house of prayer; but ye have made it a den of thieves." (Matthew 21:12-13)
This seems like an extreme overreaction by Jesus. For instance, nowhere within the gospel do we read that the money-changers were cheating their clientele; it seemed on the surface that the money-changers were merely providing a well needed orderly market and service for the pilgrims. What then is the problem? The problem fundamentally is that the material world has polluted into the spiritual temple of our hearts and our minds. The purpose of Passover is to show devotion to our Lord, everything else that takes us away from this purpose is at odds to it, what should matter to use is our right relationship with our Lord, especially on the very days and times that we have specifically set aside to worship Him.
Therefore Jesus' overturning of the tables and the casting out of the money-changers is to dramatically show us that our behaviors and our minds are not right thinking and that consequently we need a "wake-up" call to re-orient ourselves to our primary purpose which is devotion to God and nothing else. Jesus cast out the money-changers to shake us out of our lethargy and to admonish us that our primary purpose is to love our Lord our God with all of our heart, with our entire mind, and with our entire being. Jesus had no choice but to treat us as recalcitrant children in which a mere gentle admonition would not be enough to garner our attention and to protect us from our own errors and thereby place us back onto the straight and narrow path.
Jesus never lost his temper in this instance, he instead inserted his Divine Presence to rebuke those who mean well but are fogging the Divinity of God to our ultimate disservice. Our enemies are not always those that are our fiercest rivals but those that think they know right but are wrong.