It’s no surprise that cats love sprawling across computer keyboards. The obvious reason is that cats want your attention so they see you paying attention to the keyboard. Thus by sitting on the keyboard, the cat insures that it gets your attention. (Whether that attention is positive or negative depends on your mood at the time.)
Another reason is that cats love warm places and keyboards, especially on laptops, tend to be warm from the heat generated by the computer. Whatever the reason, cats seem to gravitate to keyboards especially when you need to use your computer the most, so most likely cats just like messing with their owner’s heads as a form of a power struggle to show that the cat is superior to you.
To read the whole story about why cats might like keyboards, click here.