The figure raised by the Treasury in the flotation of BT (over three tranches) was more like £14bn. That was £4bn from tranche 1 and £5bn each from tranches 2 & 3 (the last one of which was at £4.20 per share). Your figure of £25bn is the approximate amount raised by the 3G auction at the height of the telecom bubble.
Of course, £15bn is (inflation adjusted) far higher than BT's current £20bn market capitalisation, so it would appear that the government got good value. However, it's never that simple. Following the split of O2 from the main BT group (with the latter carrying the enormous debts built up largely by developing the then Cellnet, buying out Securicor's share and the purchase of 3G licenses plus buying out various foreign partners), the shareholders owned both companies. O2 was then taken over by Telefonica and thereby gained about £17.7bn. On that basis, BT shareholders did a bit better than these figures indicate. However, it is never that simple - BT launched a rights issue in 2001 which raised £5.9bn from shareholders. Overall, for those who bought into the original three tranches in proportion, inflation adjusted, it might - just - break even.
Of course the shareholders were somewhat cheated - they were sold shares under one regulatory regime and competition model but the rules were changed enormously in the late 1990s to an increasingly tougher one.
nb. one other thing the government is probably grateful for - they don't have to cover the enormous pension deficit (the liabilities for which were largely incurred pre-privatisation), unlike the position with Royal Mail. That's assuming they aren't silly enough to allow the company to go broke through an over-zealous regulator of course, in which case a privatisation-time state guarantee will be called upon).