Poor Management.
I was lucky in that my career was mainly when we led the world.
The Charlie Chaplin effect for IBM and Microsoft set back the IT world decades, but the lack of real management training and the proliferation of a little bit of financial knowledge led to a real dumbing down of company management.
I can remember a company external audit by a well known player where I was asked to define my role in the company.
They expected reams of items and were surprised when I stated I had one role, which was to ensure that my IT provision allowed everyone else in the company to fulfil their roles.
They were taken aback, but a couple of audits later their new auditor made the same general IT provision statement not realising that I was the original source. Had to chuckle there!
Meanwhile, earlier in my career, when I worked for a County Council, we had a brilliant workforce and led the way for putting computing on desks.
The in house teams wrote software that worked for the local CC staff and with minimal effort, sold it on as a commercial product for other Councils.
We developed other PC and hardware solutions and sold them on.
Than a consultant visited whilst I was on holiday and convinced the new management team that we were no good so it was pointless relying on internal staff to deliver world leading software, despite the fact that we also sold a product to the UK police Forces.
The new yes men management agreed and wound down in house provision, using outside contractors and providers with OTS solutions, leading to widespread County staff sickness epidemics due to stress, coincidentally losing ALL the external users who contributed real money to the budget.
Last I heard, whereas a user could contact the development team and point out a bug which would then be fixed immediately, it was taking two years of negotiation with the provider before they would even look at it.
So you need a good management team, not one that relies on adages like "you can't be sacked for buying xxx" etc.
Then you need a good team of workers who actually know what they are doing rather than those "experts" who don't.
My old CC lost all the good workers, but the management went on to bigger and higher wages even though the relative providion was down to about 10% of what we used to provide.