The main task of Tianhe Prison is to send those criminals who are not from Beijing back to their original places of detention. Before that, these criminals were temporarily serving their sentences in Tianhe prison.
As for the long-term criminals you mentioned, some have not been sent away for the time being, some have some specialties, and some help the police, such as distributing clothes to new prisoners.