Any inferring is being done by the ad company, not the advertiser.
And framing this as discrimination (a loaded term nowadays) is just more hyperbole, IMO. People of different races, orientations, religions etc are very likely to view different things as relevant, and at the end of the day, relevance is what any advertising company's mission in life is.
Best of all, it's all supposed to be data driven, so those nasty human biases don't even creep in. If demographic X clicks on a thing more than demographic Y, at the end of the day, that is what matters, and we can sidestep any discussions of bias, regardless if the demographic under consideration is young/old, black/white, atheist/religious, rich/poor, male/female.