One evening a few years ago, I found myself at a Christmas party in London. The event took place on the eighth floor of a building in the heart of the City and, at one point, seeking an escape from the chatter, I took my drink and ventured out on to the balcony.

It was a clear, windless night. All around was a wonderful panorama crowned by the glorious dome of St Paul's in the distance. Then I started to look at the tall, glass-walled office blocks in my immediate vicinity. Although it was after 10pm, the lights were on in every building, enabling me to see into hundreds of offices. These offices varied in size and decor, but they all had one thing in common. Somewhere in every one of them was a desk on – or under – which stood a PC.

What then came to mind was the memory of a tousle-haired young entrepreneur named Bill Gates, who once articulated a vision of "a computer on every desk, each one running Microsoft software". What I was looking at that December night was the realisation of that vision. Every one of the machines I could see was running Microsoft software: a software monoculture, if you like.

Microsoft's dominance was a testimony to the power of network effects and of technological lock-in. It led to a world in which nobody ever got fired for buying Microsoft products and no software innovation gained traction unless it was designed to run under Windows.

For a time, Microsoft was the winner that took all. It would be churlish to pretend that this was all bad news, because the de facto standardisation that Microsoft brought to personal computer technology enabled the vast expansion of the PC industry and accelerated the adoption of computers in offices and homes.

But accompanying these substantial benefits there were some significant downsides. The Microsoft monoculture presented hackers and other malefactors with a colossal and lucrative target. They exploited it with a torrent of malware – worms, viruses, trojans, etc – that continues to plague us, or those of us who still use Microsoft stuff. More insidiously – and perhaps more significantly – Microsoft's dominance left us with an exceedingly problematic legacy.

The most prominent item in that legacy is Windows XP, now 13-years-old and still the world's second most popular operating system. It currently runs nearly 28% of the world's PCs. Market research firm Gartner reckons up to a quarter of business systems and 10% of large organisations are still running XP.

That means SMEs, corporations, multinationals, utility companies, retailers, government – both local and national – and hospitals are all XP addicts. Oh, and most ATM machines are still running XP .

Why is this a big deal? Well, first there's the aforementioned monoculture problem: a significant proportion of the world's computers – in both businesses and homes – are running an elderly operating system that is vulnerable to hacking.

Even more significant, however, is the fact that on 8 April this year Microsoft released its final free security patch for XP. From now on, anyone wishing to obtain security upgrades for the system will either have to enter into an expensive ($200 a desktop) deal with Microsoft. And customers who sign up for this have to sign a so-called "migration plan" with Microsoft, which is basically a schedule for upgrading their machines to Windows 8, with all the attendant costs. It's like buying one-year insurance against flooding for your home while signing an agreement that in two years' time you will put the building on stilts.

This isn't just about companies, by the way. In this country, the government has hundreds of thousands of PCs running XP. And of the 800,000 PCs in the NHS about three-quarters are running it. In those circumstances, the news that Her Majesty's government has forked out £5.5m for one year's cover looks like a rare example of government doing the prudent thing. But in reality it has just bought time: the awful moment when the public sector has to upgrade its computers is approaching inexorably. Think of it as technology's equivalent to the Scottish referendum.

All of which puts current media commentary about Microsoft into perspective. The company is widely ridiculed for the way it has been left standing by Apple and the mobile revolution. And all that's true. But guess what? Microsoft is still fabulously profitable and the XP story explains why it will continue to be.

The folks who didn't get fired for buying Microsoft will have long retired while their successors are still forking out for it.