Video game consoles are just computers that have been custom-built for a very specific purpose. So it's not a huge leap to make a console controller play nice with your desktop or laptop.
It's especially easy if you're talking about plugging an Xbox controller...