This kind of information is typically covered in a undergraduate finance class. You could probably get an older version of a text book inexpensively from Amazon. I'm not going to focus on the UK specifically, because this happens in many governments (and in the US, it happens through private student loan companies).
Time Value of Money
User RedGrittyBrick hit the nail on the head in his comment: money today is better than money tomorrow.
Risk
Every loan comes with the risk that it won't be repaid. By selling loans, the government removed the risk on non-payments entirely.
Interest Rate
If the loans had fixed interest rates, it could be that the interest rate provided by the market is more attractive now (or is expected to be in the future). If that were the case, they would want to sell their current loans (with the worse interest rate) to make more loans (at a better interest rate).
They Need Cash
Banks often sell loans when they need cash to make other investments or loans. A government might use the same reasoning when deciding to sell loans to put the money in their general fund, to be used for general operating expenses.
Why the UK and why now?
I don't follow UK politics very closely, but the Telegraph reported that the current Treasury minister has a goal of reducing the deficit. Selling loans isn't a good way to boost your revenue (since the value of the future payments is hopefully larger than the amount loaned due to interest), but it would provide immediate cash to pay down a deficit.