If the answer to the question is yes, then is the net present value of the remaining interest payments greater than the present value of the loan payout they just received? It is, but not by a huge amount. If I was the government is be happy to get all this cash from loans paid off early and I would use it to make more money (loan it out again to something more lucrative, mitigate the risks of likely to default student loans).
i guess I need to clarify a question first: when the private company refinances the loan, do they pay the government the current principle?
Yes - otherwise, they would have to pay interest on the loan while refinancing to a lower rate (they'd lose money).