We lack the definition of the term corruption.
In some cultures, even of today, corruption of state officials is deemed a natural if not desirable source of income for the recipients family.
"When popular religions came about, they spoke of fairness and loving and respecting each other." Source? If you refer to major religions, I think this merely goes for the peer group within the respective religion, if not clan.
Religions were merely another playground for corruption, which sometimes was even taken to a spiritual level. As you can see in many of the world's major religions.
Corruption is very much a matter of tradition. If perceived as despicable, like in e.g. Switzerland, it is more often than not strongly connotated with national identity. There are some things "one simply does not do". Once these traditions are lost, teh country will go downhill. And it is a hard and difficult battle to get back from there.