That was a proactive move that turned out quite well for them. They saw that the consumer PC business was going to shrink significantly over the next 10 years, so they sold off while the price was still high.
I don't think anyone in their right mind is second guessing IBM's decision to get out of the PC business. In hindsight, it was a great move executed with perfect timing.
But they took this decision because they saw that the superior quality of their product(which having owned older Thinkpads I can say it's true) wasn't profitable enough when competing with lower cost "good enough" alternatives.
IBM's core strategy is one of technological differentiation through R&D; not price leadership. It's absolutely part of that strategy to exit commoditizing markets (which is why they got out of x86 servers as well) where product differentiation is difficult.