There have been many formulations of the root problem in such cases, Campbell's formulation fits best here.
Campbell's law: The more any quantitative social indicator is used for social decision-making, the more subject it will be to corruption pressures and the more apt it will be to distort and corrupt the social processes it is intended to monitor.