I'd just note that you can smuggle nasty behavior into any formal mechanism. Witness the legal system (which you'd engage here) - whining about bad-faith arguments in court is basically a national sport in the US, until the whiner is the plaintiff.
Fortunately, the management chain caught this and ... corrected the issue.
My wife showed a sign of mild disapproval, and that was it. She was rejected for "not a culture fit".
Perhaps check references to determine if either candidate was able to work well in the type of environment you provide.
For example - the nice person may be lazy, or the abrasive person may productive and helpful.
It's been my experience that contacting the candidates references will flush that information out. Even in this age of litigation - I've always been able to get an answer to "Please rate on a scale of 1 to 10"
We've avoided some people that interviewed well and had great skills but were horrible human beings - and we've picked up some people that are hard workers that are willing to learn that didn't interview well.
If your hiring criteria excludes groups like that by a "fast friend" proxy test, then yeah, you should be taking the better programmer.
Sure, it'll be more productive for everyone if I tell someone that we think they're just not smart enough to learn shit as fast as we need them to. But that hurts. So we say "You're great, but we're looking for someone with just a few more years of C++ experience". Similarly, when we think you've been acting like an arrogant dick, we say "lack of culture fit".
I once rejected someone whose English was so bad that I couldn't understand them on the phone. That's a hard thing to tell a foreigner who has the courage to call you up, by phone, in a language they probably know they're not great at, for an internship position! So I lied and I told them they had insufficient React experience. Am I proud of that? No. I'm still not sure what I should've done.
I see this trope a lot on HN that "lack of culture fit" means "wrong brand of sneakers" and it's usually nonsense. "No culture fit" means "there's something specific that we dislike about the way you behave or communicate but we don't want to hurt your feelings more than necessary".
Candidate one gives off slightly anti-social vibes but is brilliant, candidate two jokes around with me during the interview and is smart as well, but less so than candidate one. Am I justified in going with candidate two on a hunch?
Which is also why there are usually multiple stages in an interview process, or at least, you pass a candidate to 3 or more team members to interview the candidate.
In my experience, it's hard to find good candidates, but not that hard to figure out which of the candidates will be a good fit, and a strong contributor, to a team. I've also hired mostly for team sizes of 10-20 developers, not 200.
This doesn't even touch even more difficult situations like when your friend messes up and needs to be dealt with in a professional but non-personal manner.
So yeah, hire the better coder.
Culture is preference between two otherwise value-neutral positions.
For example: encouraging collaboration vs. encouraging independent work.
Or supporting self-organizing teams vs. all work having a WBS/charge code.
Culture is not choosing between being respectful and not; or choosing between being openminded and not; or choosing between being honest or not.
I look younger than I am, but my patience for over-working too many hours is at an end. Years of stress have led to health issues that have to be managed.
But this all rolls into "not a cultural fit."
I don't blame them for not wanting to hire someone pushing 50. They just don't know if they're going to get the cool 50-year-old or the grumpy old troll who won't listen to anyone.
Of course they can never come out and say that for obvious reasons.
I play video games. I have all of the last two generations of consoles, a smattering of older consoles I've managed to hold onto over the years (lost most of them for one reason or another) and a half-decent gaming PC where I prefer to play games if possible. On top of that I've done game development on the side, and have run multiple gaming communities for approximately a decade now.
If I went to go interview with a company and they talked about how they were all "gamers", I'd be running for the hills.
You know what I want to do at work? Work.
You know what I want to talk about at work? Not video games.
You know what I want for non-monetary compensation? Not a weekly autochess tournament or PUBG squad night.
You know what kind of people I want to be surrounded with? Not a bunch of clones who all have the same beliefs and values and (lack of) experiences.
You should be a good fit for the company, and the company should be a good fit for you. It goes both ways.