Humans are made up of many loosely independent traits. You can be a genius and also a pissbaby; in fact, many successful geniuses are, since always wanting to have your way is beneficial if your way is usually correct.
When you're an asshole it doesn't matter if you're right or wrong, because people don't want to give you the satisfaction of admitting you're right.