Meta: I am finding that it is very difficult to have an intelligent discussion about deeply stupid things. This leads to many of these posts getting flagged.
The point isn't to repatriate immigrants to their countries of origin. It's to inflict as much cruelty and suffering as possible to act as an example/deterrent for future would-be immigrants, and to encourage as-yet undetained immigrants to self-deport.
(I am not defending this policy, I think it's abhorrent)
In that case you either need to kep them detained in your country with the problem of space, protests, haggling with the recipient country; or outsourcing the problem, possibly ultimately cheaper.
We have the problem in France: convicts are not accepted by their country. Being a lawful country we are basically stuck.
Wouldn't it make more sense to just send them to the home countries if that's the point anyway?