As I was explained in another question in this SE community, prosecutors dont have the resources to prosecute every single crime Does a prosecutor have any legal resource..
Then, what does it prevent a state to prosecute people discriminatorily as it might and it indeed happens in certain countries (based in race, sex, political affiliation, etc)? Is there any legal mechanism in any country, that prevents a state to apply laws discriminatorily?