I'm a recruiter and have heard this more times than I can remember as the reason given for why a candidate is not suitable.
I think it is simply a convenient, sufficiently vague, unarguable reason to say no.
It's important to understand that people feel very uncomfortable rejecting another person, and in recruiting, companies really prefer not to give any reason at all - this is because they don't want the candidate to come back arguing with the reasons given for the rejection.
So "not a cultural fit" is just an easy way to say no thanks, whilst giving a "reason" that can't be argued with.
It's not discriminatory.