You might change your moral judgement of someone's behavior if you find out they have this or that condition (at least I do), but it doesn't change how their behavior impacts you, does it? If it did, I think the best you could do is to assume that everyone has some sort of condition that makes them act the way they do, and it'll be less of a problem.
E.g. I work with someone who seems very normal, is very professional, and I have no reason to believe that they area neurodiverse in any way. They once were very direct in a ticket towards a different team. Did they choose to be an asshole, or were they losing their last ounce of patience and politeness because they've been carrying a mountain of responsibility and stress? I think it's very difficult to tell that apart, or to judge based on "well, they could have not taken on that responsibility so they're liable for anything that is a consequence of it".
I don't consider it a free pass, but there's a lot more understanding for things that are outside your control. Where we see that line of control probably determines whether we judge someone harshly or not.
But did the company make them a team lead and put him in charge of other people?
I don’t at all condone being that guy. However….
It’s pretty amazing what an engineer can accomplish if you can actually get into a flow state because people are too afraid/intimidated to interrupt you every 10 minutes and you aren’t being invited to endless (and mostly useless) meetings all day.
¯\_(ツ)_/¯
I've worked with plenty of programmers who were absolutely insufferable human beings but were some kind of supernatural coders who were doing the work of 20 people or were literally the only people who could understand the maths or physics or rendering in our products - so everyone kinda put up with it. I used to know someone who had dozens of HR complaints about them every year and nothing was done because the company didn't think they could risk firing them.
So yeah. They exist. And I don't think AI is going to do much about them, but I'd love to be proven wrong.