Computers might not be profitable for HP, but supposedly they drive other, more profitable sales. (I'm not sure what those other products are, though!)
Printers and ink, baby.
Example tie-in: Kid going off to college? Tuition is expensive, buy a low-cost HP laptop and we'll toss in a discount on an HP inkjet printer! You don't want to deal with library printing and waiting in lines, you'll want a printer in your room!
McDonald's doesn't make much money on the burgers themselves. The profit is in the fries and sodas. The point being that it would be absurd for McDonalds to decide to kill off the burger, because it "wasn't profitable". The burger drives those other sales.
Computers might not be profitable for HP, but supposedly they drive other, more profitable sales. (I'm not sure what those other products are, though!)