If you've never seen this level of perverse incentive, you have been lucky. The creation of and subsequent exploitation of them aren't new. For pre computer examples: https://freakonomics.com/podcast/the-cobra-effect-2/
I can't find the reference right now, but I remember reading literature about studies done at large programming organizations (like IBM, government) who used LOCs as a performance metric. Programmers could earn more money by including more lines of code in their work. This went exactly the way you'd expect.
Edit: I think it may have been from Capers Jones's _Programming Productivity_[1]. Published in 1986, based on research covering the prior 30 years(!) or so. We have known that bad incentives specifically distort the performance of programming teams for a long time.
The worse example I know is the time the Belgians forced the Congolese to harvest more rubber by cutting their hands if they haven't reached the correct quota, ensuing a cross-tribe hands trading economy
Similar to the British in India, it was first controlled by some kind of company that benefitted the host country by extracting resources, and later on the host country took control. Belgium took control of Congo in 1908
It was literally the king that wanted it as personal venture. Belgium took over because he was very/too bad ( you're right that the governement was involved, I stand corrected).
Healthcare and infrastructure was then build too, but the relation was already scarred and well, it's not easy to reset everything.