Except that by definition, meritocracy creates a power dynamic which can be abused in this way. Those with "merit" are trusted and respected more than those without. This means that complaints about their behaviour are more often ignored or dismissed. And even when bad behaviour is too blatant to ignore, the punishment is often lesser, for fear of chasing away their "merit".
In theory, one could define "merit" in a way that recognises behaviour alongside technical contributions, but in practice that is rarely how the term is interpreted by tech communities.