It's that whole due process thing. We can't hold them forever and the dates for the court hearings are far and few.
In my state, it's common for different jurisdictions to take prisoners from other jurisdictions for a modest fee (to balance out capacity vs. need ratios).
I'm sure "Sheriff Joe" could be persuaded to erect a few more tents in the Arizona desert to house the criminal aliens, and I understand his costs are fairly low. If they don't like that sort of accomodations, then they could consider staying in Mexico next time.
Federal detention standards (laws) would not allow it.