On 11 August 2011, Bob Diamond, chief executive of Barclays, delivered the BBC Today Programme business lecture. In it he declared that "culture" was the critical element in responsible banking, and the best test of it is "how people behave while no one is watching." We now know that banking failed the test and so must ask why, in Sir Mervyn King's words, "excessive compensation", "shoddy treatment of customers", "mis-selling" and "the deceitful manipulation of a key interest rate", flourished in the banking sector. Cognitive neuroscience can point to some answers.

Senior bankers hold enormous power, greater than that of many elected national leaders. Largely unaccountable except to occasional shareholders meetings and often quiescent boards, their power is much less constrained than that of democratically elected leaders. And given that power is one of the most potent brain-changing drugs known to humankind, unconstrained power has enormously distorting effects on behaviour, emotions and thinking.

Holding power changes brains by boosting testosterone, which in turn increases the chemical messenger dopamine in the brain's reward systems. Extraordinary power causes extraordinary brain changes, which in their extreme form manifest themselves in personality distortions, such as those seen in dictators like Muammar Gaddafi.

The "masters of the universe" who have arisen out of a deregulated world financial system were given unprecedented power that inevitably must have caused major changes to their brains. While power in moderate doses can make people smarter, more strategic in their thinking, bolder and less depressed, in too-large doses it can make them egocentric and un-empathic, greedy for rewards – financial, sexual, interpersonal, material – likely to treat others as objects, and with a dulled perception of risk.

This power-primed boldness and forward-looking focus on rewards arises from a neural "approach mode" that biases attention, memory, action and emotions towards thoughts and feelings linked to success and conquest. Low power, on the other hand, tends to trigger a neural "avoidance mode", where mood is low and anxiety high because of worries about threats and future uncontrollable events. These approach and avoidance modes are linked to different networks in the right and left sides of the brain respectively, and to different chemical messenger systems. The wild oscillations of financial markets are partly the result of traders' brains lurching between these two modes: it is a characteristic of being in one mode that it is hard to think in terms of the other – a bit like finding it hard to imagine a sunny day in the middle of a bleak, dark winter day, or vice versa.

The problem with several decades of financial deregulation and rising profits and bonuses is that the brains of an entire financial industry became locked into the neurological "approach mode" and it became difficult for them even to conceive of the downside. It is a feature of these mental modes that even remembering events or facts which run counter to the prevailing mood is hard – hence depressed, anxious people find it difficult to remember good things that have happened to them, making it even harder to escape the depression. Significantly, those in a buoyant "approach" mode of thinking, find recalling negative events and facts difficult.

Does that, then, explain the strange behaviour of the senior bankers – is it simply a matter of an acquired mesmeric focus on rewards and a stunted appreciation of risk? There is more to it than that because power affects something else more fundamental to the events we have witnessed and that also bears directly on Bob Diamond's "what we do when we are not being watched" test.

Researchers at Tilburg University showed that people made to feel more powerful cheated more when they believed themselves to be unobserved. Power also made ordinary people more hypocritical when making judgments about moral dilemmas, being much more strict in applying rules to others, but much more lax in applying them to themselves. Even tiny amounts of artificial power, in other words, increased both immorality and hypocrisy.

And there is a further point. Senior bankers, by virtue of their enormous wealth, sit at the top of the socioeconomic tree. Paul Piff of the University of Berkeley found in a US-based study that, compared with lower class people, upper class individuals were more likely to break the law while driving, to show unethical tendencies in decision-making, to take valued goods from others, to lie in a negotiation, to cheat in order to improve their chances of winning a prize, and to endorse unethical behaviour in a work situation.

But it was not the social class itself that seemed to cause these differences, rather it was something else that was associated with it – greed. High social class people who were not overly reward-focused, that is to say, who were not particularly greedy, were not more likely to behave immorally and illegally, this was true only of those who were greedy, with more of the upper-class people showing signs of greed than the lower social class ones.

It has become a cliche to explain the behaviour of bankers in terms of greed, but cliches are not always wrong. Power and money both act on the brain's reward system, which if over-stimulated for long periods develops appetites that are difficult to satisfy, just as is the case for drug addiction. We call these appetites greed and greedy people are never satisfied. That is the challenge for politicians and regulators.

• Follow Comment is free on Twitter @commentisfree