Why is this allowed to happen?
I think it is a little more complex than just, people don't care, I think it's a feature of the way decisions are made in these systems.
The people making the political decisions at the top aren't really involved in the nitty gritty realities of the whole thing at all. It may be that they don't care, but in any case they don't really know what it's like to live and work in a prison, and it isn't something they are keenly aware of all the time, it's probably something they think about occasionally. They have a lot of outside pressures in their decision making too, not least being elected, but also people lobbyists, party pressures, and even well-meaning people making arguments about the science or human rights elements. They are relying on others to fill them in on the technical elements, and they may have to think about what the courts are saying as well. They also, very often, have to live with less than perfect decisions because that is what is politically possible - if they were purists they'd not be in politics.
Then, the people within the system are used to having to do whatever is passed down from above, even if it is stupid. They often aren't empowered in any way to disagree, at most they could leave their jobs, which doesn't seem helpful. Even those at the top know they are limited in what they can challenge and often have to play the political game to keep their jobs - they may also be required to keep out of partisan questions in some cases, and disagreeing with rights issues might not go over well.
This all leads to an environment where really bad decisions can be made by people who don't know much about the situation, and the people who do have no way to do much about it, and have learned to keep quiet. Those who can't burn out and leave the sector early on.