Of course it makes a difference. If your standard for exemption is a public benefit, then it makes sense that organizations operating outside the laws of a local jurisdiction would no longer be eligible for that benefit. To wit, California specifically treats discrimination for reasons of sexual orientation the same as discrimination along other lines such as race or gender. A group that discriminated against a specific race is not eligible for tax-exempt status under Federal filing regulations. California's rules, by including sexual orientation, are more stringent than the Federal rules, and would exclude the Boy Scouts given their stance on homosexuality. The Boy Scouts would still receive exemption at the Federal level, but they would be responsible for state taxes in California since they no longer meet California's stance for a non-discriminatory organization.
Now, if you hold that the purpose of tax exemption is something other than providing a public benefit, then you could also start down the path that discrimination codes shouldn't apply. That's why it's important to start from the standpoint asking why we give tax exempt status to anyone. I think it's because of the public benefit myself. And it's well within California's rights as a state to say that organizations that do not meet specific anti-discrimination laws are not operating for the public benefit according to their laws.