I used to think the same way as you, and then I started a company and had to pay out of pocket for employees, and the sad truth that I almost hate myself for admitting is that if you have to pick between incompetent but nice, and competent but a jerk, you take the jerk. And yes, multiple people will even quit because you picked the jerk over the nice guy, and I still found it's worth it to take the jerk because of how competency scales. A good/competent software engineer can genuinely do the work of many, many mediocre developers and you're almost always better off with a small number of really solid developers over a large number of nice but mediocre ones.
Now of course we can always exaggerate things to an extreme and compare a racist, sexist, jerk who swears nonstop, to someone who is mildly incompetent, and there are certain principles and boundaries that are worth upholding with respect to how people treat each other regardless of their productivity, but in actuality that's not really the difficult choice you end up facing.
The really difficult choice you end up facing is someone who is nice and gets along with people but is ultimately too dependent on others to do their job versus someone who works independently and does an excellent job but is very blunt and can be an asshole in regards to the expectations they hold others to. Good software developers often expect their peers to also be at a high standard and will speak in very plain, rude, and blunt language if they feel others are not pulling their weight.
And finally, I have observed that in the long run, competent people tend to prefer to work with others whose skill they respect and they feel they can learn from because they're really good at their job, compared to working with someone who is pleasant but is always dependent on others. Being nice is a good short term skill to have, but people get used to those who are nice but they never get used to someone who is incompetent.
Now of course we can always exaggerate things to an extreme and compare a racist, sexist, jerk who swears nonstop, to someone who is mildly incompetent, and there are certain principles and boundaries that are worth upholding with respect to how people treat each other regardless of their productivity, but in actuality that's not really the difficult choice you end up facing.
The really difficult choice you end up facing is someone who is nice and gets along with people but is ultimately too dependent on others to do their job versus someone who works independently and does an excellent job but is very blunt and can be an asshole in regards to the expectations they hold others to. Good software developers often expect their peers to also be at a high standard and will speak in very plain, rude, and blunt language if they feel others are not pulling their weight.
And finally, I have observed that in the long run, competent people tend to prefer to work with others whose skill they respect and they feel they can learn from because they're really good at their job, compared to working with someone who is pleasant but is always dependent on others. Being nice is a good short term skill to have, but people get used to those who are nice but they never get used to someone who is incompetent.