In these financially troubled times, bankers tend not to score too highly on the scale of public admiration, with their bonuses, bailouts and bad loans. But today details emerged of a woman who may confound the popular view that everyone in the industry is in it for themselves.

The 62-year-old branch head of one German bank was hailed as a hero after she confessed to transferring money from rich customers to help her poorer clients. Already, she has been dubbed "Die Robin Hood Bankerin".

She was given a 22-month suspended sentence after moving more than €7.6m (£6.9m) in 117 transfers between 2003 and 2005. The court in Bonn was told that the employee, who has not been named, took no money for herself.

"The accused hasn't put one cent in her own pocket. She did it purely out of sympathy with people who were suffering financially," the woman's lawyer, Thomas Ohm, said. She was a "good samaritan" with a "Mother Courage" nature, referencing the Brecht character who believes she can do good in a bad world. The employee was accused of allowing overdrafts for customers who would not normally qualify for them. She then used the money from richer customers to temporarily disguise the loans during the bank's monthly audit of overdrafts.

The woman knew most of the clients of her small rural branch and had access to their accounts, German TV station WDR reported. That's how she discovered that some of her richest customers – some with six-figure balances – had not touched their accounts in years. Meanwhile, others were drowning in debt. "Customers asked me if I could help them. They couldn't get credit in a conventional way," the woman told the court, adding that she found her actions unbelievable now. "I can't understand it any more. I must have had helper syndrome."

Out of sympathy, she began to move money about, ostensibly to "lend" from the rich to the poor for a short period. The authorities finally cottoned on when she broadened her reach, subsidising a small taxi firm in addition to her private clients.

The woman could have faced a four-year prison sentence, but the court decided on leniency as she had confessed immediately and did not profit personally.

The judge said: "It's difficult to find an appropriate punishment here. On the one hand we have big losses. But on the other hand we have here this altruistic behaviour, which makes the case very different from the norm."