Meritocracy is not about allowing discrimination based on race, gender, sexual orientation or whatever.
It is about hiring the best qualified for a job even if the person is a white, male Republican.
But there are other subjective subtleties that factor in too:
Will the snooty self-righteous judgmental uber-Christian fit in with the sometimes rough talking, sometimes crude, even profane work force already in place? Or is that just begging for toxicity to be introduced into an otherwise congenial and productive atmosphere?
The most qualified candidate for the job turns out to be tattooed all over with visible body piercings that the boss knows will not go over well with his/her particular clientele. Should the boss have to hire that candidate anyway?
The male boss needs an assistant to often travel with him on overnight trips. Does he hire the extremely qualified beautiful woman that would almost certainly trigger ugly rumors and innuendo, would naturally worry his wife, etc? Or the slightly less qualified guy that would create none of those problems?
Somewhere in there is a happy medium that provides maximum liberty along with maximum quality, efficiency, effectiveness etc. and also common sense.