They were directly competing with the future of tech, in particular as it applied to personal use.
However, what IBM forgot is that the market is big, and the market drives towards commoditization wherever it can. Any technical advancement that makes technology faster/cheaper is where the market will go -- even if it means compromising in other areas like up-time. IBM is, naturally, allergic to becoming a commodity and tries to drive to higher margin business. e.g. Mainframes, consultant heavy engagements, AI, etc.
But the revolution that happened since the PC revolution, that commodity hardware and open source software (free in beer and freedom) could power companies both the size of IBM and in the same competitive space seems to be a lesson IBM has perpetually never quite gotten into their DNA. There's no "fixing" IBM. It will linger on momentum for a while until somebody else eventually just buys it for whatever IP they can squeeze out of it, dismembers the corpse, and spins out single purpose core businesses all in one excrement pile. It might take another decade or so, but it's coming.
I don't think there is a 2nd law of thermodynamics for social and economic processes, and I think that it is provably the case that specific decisions were made by specific people that allowed all of the things you described to happen, and that there are easily conceivable alternative paths we might have taken.
In some sense, IBM is idealistic in the true sense of the word. That ideology is certainly not HackerNews' ideology, but it is more complicated than the simple "capitalist company doing capitalist things" explanation.
To wit, I just watched a long form video [1] on the passion that goes into IBM mainframes including some interesting clips of various physical robustness tests of the assembled systems. It reminded me of watching clips from various space programs where a largely full-up untested rocket had to put humans into orbit without blowing up.
Another revolution that's occurred, but IBM chose not to really follow (asterisk) is the idea that you assume some percentage of your hardware will fail (instead of trying to make it never die) -- then you engineer around that. I'm not sure what will win in the end, but right now the entire industry is telling us to have failover into different availability zones in Amazon, or even across clouds -- one of which IBM offers.
1 - https://youtu.be/ouAG4vXFORc (asterisk) - IBM does sort of have an understanding of this of course, they have a cloud after all.
IBM problem today is:
1) The bureaucracy and general organizational sluggishness created by years and years of policy over policy to avoid 1%, 2% risks that in the end impact 100% of the company.
2) the leadership, which mostly come from the commercial part of the firm and are "number cookers", who now how to play the forementioned bureaucracy and controls, moving around air to look like their are beating their targets.
This makes the company extremely slow, unwilling to take risks, letting Google and Microsoft pass them repeatedly. Personal Computers, the Internet, Cloud Computing and now AI. IBM was at the right place on all of those opportunities, but its internal problems made it unable to take the right action to fetch them.