Sorry but that's bullshit.
It's extremely rare for any part of government to have that as an intended purpose.
But it's extremely common, unfortunately, for people involved to be willing to accept that as a side effect in pursuing whatever their goals are - whether that's gaining funding for their police department, or raising political donations from the owners of a private prison, or keeping poor people away from their beautiful upper middle class neighbourhood, or environment-ruining chemical company, or... whatever.
The purpose of a system is what it does. If that wasn't the purpose, the system would be changed.
It's not as rare as you might think.
Organizations such as OSF/OSI (Open Society Foundations, not Open Software Foundation) have successfully placed their preferred candidates in positions of power in many major US jurisdictions. If you research, you'll see many cases of OSF DAs prosecuting or not prosecuting based on their political ideology. Many prosecutions are politically motivated, but now we have foundations funding activist candidates who are all pushing the same agenda. The result is diminished trust in government, which the activists will exploit to eventually make things even worse, because "capitalism is not working."
A system’s purpose is what it does, not what it claims to do.