People rarely get fired solely due to technical incompetence, in my experience.
Technical competence happens to be much easier to test for than most of the other factors, and it can compensate to some degree for e.g. bad interpersonal skills. This is indeed part of why tech is such an autism-friendly field. But I've only seen a few people get let go for being great team players, excellent requirements analysts, etc., but just totally unable to code - for better or worse.
(More common is they get shifted to a role which better aligns with their "true" skillset. Why didn't they get this role in the first place? Again: Hard to test for.)
Technical competence happens to be much easier to test for than most of the other factors, and it can compensate to some degree for e.g. bad interpersonal skills. This is indeed part of why tech is such an autism-friendly field. But I've only seen a few people get let go for being great team players, excellent requirements analysts, etc., but just totally unable to code - for better or worse.
(More common is they get shifted to a role which better aligns with their "true" skillset. Why didn't they get this role in the first place? Again: Hard to test for.)