The government can switch to being really efficient and less corrupt when it's under the barrel of a gun and needs to fight for survival. See WW2 US or present day Ukraine.
Less so after decades of unchallenged safety and prosperity where it switches to nepotism and rent seeking as the default MO.