Why did a few thousand immigrants imprisoned in South Texas riot last week against the nice private prison corporation that was housing them? Management and Training Corp.'s version of events is that its inmates "refused to participate in regular work duties or attend breakfast early Friday morning," which certainly seems like an unreasonable thing for an inmate to do.

The inmates then somehow broke out of their housing units, forcing the company to bring in multiple government agencies to lock the place down and also forcing a partial lock-down of the local school district in Willacy County.

Boy, these illegals have a lot of gumption to crash our state and then complain about the prisons here, right, America? But the truth is not so simple. In reality, the illegal immigrants were not totally unwelcome, at least not by Management and Training Corp. and Willacy County.

MTC had been running its prison under a contract with Immigrations and Customs Enforcement, housing illegal immigrants in pre-detention, but in 2011 things went haywire. In a PBS report, a former health worker at the prison testified to "women harassed for sexual favors, guards taking detainees and beating them, running them down like they were animals," among other abuses. That year, ICE canceled its contract with the corporation, leaving MTC's 3,174 beds severely underused.

That is, they were underused briefly. Not long after, MTC and Willacy County arranged a contract with the Bureau of Prisons for a facility that would be an upgrade, of sorts: it would become a Criminal Alien Requirement prison, or CAR prison, for immigrants caught crossing the border illegally or convicted of felonies. There are 13 such prisons in the United States, five in Texas. "We know them to be the worst of the worst," says Cristina Parker, who covers immigration for the advocacy group Grassroots Leadership. "They don't meet the federal standards the way that even very bad federal prisons do."

Yeah, but look at all the money! Under its CAR prison contract, MTC got $532 million. And Willacy County was promised to get nearly $3 million each year, on the condition that the prison is kept 90 percent full at all times.

Sure, prisoners' rights advocates say that such an arrangement may give an unhealthy incentive to lock up as many people as possible. But Willacy County officials were very excited to bring in all of those immigrants in 2012. "It's a much better deal for the county," Willacy County Judge John F. Gonzales Jr. told the local newspaper at the time. "It will be advantageous to keep it as full as possible," he added. "It has never been more than half full."

MTC did such a good job filling the prison that when the American Civil Liberties Union investigated the facility last year they found that the prison had packed 200 prisoners into each of its 200-foot-long Kevlar tents, creating a very uncomfortable "tent city" of sorts:

They are reportedly housed so tightly that when they lie in their bunks, their feet can touch the bunk next to them.Prisoners told us the overcrowding and lack of constructive activity drives many of them mad. Fights frequently break out. One prisoner told us it was like 'walking on minefields.'

Good work, everyone. With equally terrible conditions documented at Texas' other four CAR prisons and immigrants continuing to cross the South Texas border in droves, we can only anticipate more prison riots happening in our state.