I've read the problem with Mexico is police officers don't get paid much. So many take money under the table to let bad people slide. If they paid decent wages to their cops, and got some good honest ones, a lot of the crime would and could be stopped. Corruption in Mexico goes all the way to the top.
Northern Mexico and Southwestern US along the border had about the same standard of living in 1925. That year, Mexico elected a socialist government which proceeded to take over utilities, mining, drilling, etc and nationalize those industries. Mexicans can own land and work it for farming, or build a house, but they don't own the mineral rights. Thus Mexican's remain poor except for a few. Since 1925 they have only elected one non socialist president, and that was Fox back several years ago. He only served one term. This is the problem with socialism. Once it takes hold, it is hard to shake off, and it is hard for the poor to have any upward mobility.
That's an overly simplistic view of Mexican authority. It's also the PC version most gringos like to accept.
The reality is that it is in their culture to oppress. They take pride in it. They made it, you didn't, and they will treat you accordingly. The badge is not seen as a source of income, it's seen as the means to make income. Even if their salary was $100,000 a year, they're still going to use that badge to earn an extra $100K or better.
It is a third world schit hole down there and always will be.