Why did IBM buy Red Hat?

At $34-billion, it’s the biggest software acquisition ever. So, why is IBM spending so much money on Red Hat?