I can travel 45 minutes south by car, enter Mexico in Tijuana from the USA, and experience the exact same thing. In fact, I have. I just haven't been there for a very long time.
In Mexico, they won't usually kill a US citizen (unless you are caught up with cartels or wrong place wrong time). They will jail and keep you until your family or a loved one pays a high amount.
Most people get in trouble for truly breaking the law, but it makes you think twice. This is why I don't go to Mexico, spend any time, or money there.
All these things are wrong and unfair. Only those that committed an offence should be punished and not innocent people
And in the wrong place in the US they will plant drugs on you, or stake out certain roads and target out of State vehicles for special treatment. Not taking bribes but looking for any excuse to bust you and extort some revenue for the city. I'm sure POC experience harassment just for the heck of it all the time. Again not for bribes, too easy to prove, just psychological warfare and the chance of getting a bad reaction leading to some kind of conviction. Jail == revenue. And in some places where local mobs with with the police you will get actual bribes. Maybe it is less common or done more discreetly but it exists. Income inequality and broken systems that protect bad actors not expel them always lead to this kind of problem.
Sorry you experienced a much more blatant version of it.
Oh yea absolutely. There's places you'll just get jacked at gun point. Maybe they'll let you live. In the USA. You gotta know where you are.