It doesn't have to start off with corporations deliberately trying to be evil - just self-interested. I know a little about letting of govt IT contracts.
The TL;DR is that any supplier who gets a contract to operate an IT system in addition to supplying it may be able to create enough disruption, at the end of the contract, to bring the entire service to a halt for months. Where "the service" is the Post Office, or the air traffic control system, or the NHS, or HMRC. So replacing an incumbent supplier, because their contract has expired or they have fallen below a Service Level Agreement, can be nigh impossible.
Longer version.
Fujitsu will have produced a system to a deadline, and realised the system didn't work very well, but once the PO had abandoned paper accounting, there wasn't an alternative system the PO could just click its fingers and migrate to.
There would be the visible expense of removing the old, and supplying and installing the new, of tens of thousands of pieces of hardware spread round every sub Post Office in the UK.
But that's peanuts compared with the other damage a supplier can cause.
Suppose a contract expires and the incumbent supplier doesn't win the contract for the next 10 years' supply: the contract is awarded to a competitor.
The original supplier may not be in a mood to co-operate with the new supplier, or with the government. For the many months remaining of the contract, the original supplier may do the absolute minimum required to avoid being successfully sued (which will depend on the exact wording of the contract and how much money the supplier is prepared to throw at lawyers). The supplier might de fact do no work at all for 6 months.
Then there's the on-going user data. Contractually there may be an obligation for the original supplier to hand this over to the new supplier. But why stir their stumps to do this in a timely manner.
And when they do finally supply the data, it might not be in a form readily useable by the new supplier, who has spent months or years building or adapting their own proprietary software. The new software is unlikely to mesh with the original supplier's proprietary software, to which the new supplier will probably not have had access.
And on top of all that, the original supplier may claim it is not able to output any but the most basic user data (certainly not enough to do the year's accounting or keep 7 years of records), because of some way this is embedded in the original supplier's proprietary software which the original supplier does not have to relinquish.
You would think the contract would have covered all these bases, but it might not. Or the supplier might have big lawyers and is hoping either to win outright or scare off the government dept (which just wants to get on with its day job), or at least delay enough to cause enormous loss and nuisance and discourage anyone from dumping or crossing it ever again. Tactic sound familiar?
In addition to all of this, suppliers which fail to get contracts have taken to actually suing the government for the process. Eg:
https://www.theguardian.com/business/2019/may/24/virgin-trains-takes-government-to-court-over-west-coast-route
Regardless of the rights and wrongs of this particular 2019 case, I'm aware that the arrival some years ago of suing, as a tactic by losing bidders, put the fear of god into procurement departments. It added yet another criteria to the job of choosing which supplier for a mega contract, viz, which supplier was most likely to attempt to sue (successfully or otherwise - the process is the punishment. Again, sounds familiar).