In a system where the state is very intrusive, corruption is how people make a space for individual initiative.
There are essentially two kinds of corruption. There is the kind driven by greed, and the kind that an intrusive, statist system makes necessary.
The first kind is made possible by concentrating power in government hands, with insufficient checks and balances. The latter kind is made necessary by economic stagnation, which is also caused by intrusive statist rule, which in many countries means that government employees are behind months in their salaries, or paid salaries that are a pittance. In such cases they will charge an unofficial fee for their services.
If a lawyer is handling your case, you may never be aware of the unofficial fees being paid, you just pay the lawyer his fees and it all happens.
And the latter kind is made necessary by the lack of legal clarity, and the maze of conflicting legal requirements. In many cases conflicting and irrational regulations mean that meeting the letter of the law will never be possible.
And in third world countries, where a kind of populism is the default political tendency, written law takes a back seat to desired outcomes, which means that everything becomes politicized. The resultant lack of clarity opens the door to every kind of red tape obstruction, which makes personal contacts in the various agencies an absolute necessity. If you have the contacts, or can get access to them by some means, you can get the permits you need to operate. If you don't have access, then you try and go ahead without them, hoping to pay off the inspectors who sooner or later will try and shut you down.
So this kind of survival corruption is how people carve out a kind of freedom for themselves. But it is a slippery kind of freedom, it relies on having friends at city hall, cousins at the police station, in-laws in the military high command. And if the other party gets voted in, you need some new friends fast.
The party on the outside will always rail against corruption, and vow to end it if they get into power. But since they are also populists, they will also concentrate power in order to solve society's problems, and they will also implement outcome-oriented government as opposed to strict rule of law, so that corruption under the new guys will be even more possible and even more necessary than it was under the old guys. And the economic stagnation that they swore to address becomes even worse. Its not that they go into office planning to be corrupt, its that intrusive government means even more red-tape which forces everyone to rely on personal contacts and unofficial fees to get anything at all done.
A guy I used to work for had a tactic he used in the face of irrational regulations, which was "compliance unto destruction", which meant that if you insisted on obeying every rule to the letter, eventually the whole thing would come apart and you would then be free to do as you like. The flip side of that, which happens in well meaning new governments, is "enforcement unto destruction". They have no intent to be corrupt as their predecessors, so they try to enforce every rule. It doesn't take long, though, for the folly of that to become obvious, and so slowly but surely they are back to the more rational selective enforcement as is traditional. And since they can't pay their public officials either, well, welcome to the new day, same as yesterday.