Nobody is going to hold prisoners from another country indefinitely for free.
Where there's money, there's some kind of agreement. Even if it's completely unspoken and unwritten (which I doubt either way).
If the money stops, so would their acceptance of droves of new deportees.
Not to mention that $6M for 300 people indefinitely is nowhere near enough... but for 1 year it certainly makes a lot more sense, I think that comes out to $20k/yr per person, which is cheaper than what it costs the US to do the same.