I personally think laying off people at the time was the right decision.
However, buying a company with an identical product portfolio like Compaq, with the reason 'we wanted to get into consulting' was stupid, when for the same price HP could have purchased Accenture - even if Accenture hadn't grown, it still would have been a much better choice.