I had both dogs and cats. I think each person's preference depends on their personality. Of course you can like both, but sometimes it feels like they were made for completely different kinds of people! In the end I prefer cats, and by much, precisely because I think they are more in tune with my personality, they're more compatible with it.
I had a sweet little Yorkshire for a dozen years, and obviously I cared for her immensely, but that did not give me as much joy as cats do. The problem with dogs is that they need a lot of love and they give a lot of love, and not everyone is ready for that kind of commitment. Because it is, indeed, a commitment. When you get a dog you'll know you'll have to make lots of efforts to make him/her feel loved. It's a bit like having a baby, there's the same dependence from you, the same complete loyalty and great love, and those are beautiful things. But not everyone wants those things. I don't want adoration from an animal.
With cats it's different. They do need love, and do they give love, but more as an independent entity from you. The key with cats is respect. Respect of their nature, of what they are, of their needs, their privacy, their nap time. You just need to provide them with the pluses that make their lives that much better, but they have a plan of their own and they intend to follow it! I like their spirit, and I love the fact that they won't change just for me. That's how it is for me, although sometimes when my cat pushes me away with his paw I watch the videos of dogs almost breaking their back from joy when their master returns after a long time, and I start yearning for a dog of my own!