If you're excluded from being targeted by an FB ad you have no chance of seeing it. If that exclusion criteria forms the basis of a protected class and the ad in question relates to housing, that's illegal. So it's a very narrow set of behaviors that are wrong here, not all of ad targeting.
E.g. it's probably not illegal (or even morally wrong) to exclude someone who is interested in topics such as "Hinduism" from ads for beef jerky. Even though religion is a protected class, beef jerky isn't housing.
Similarly, it's (probably) not wrong to exclude low-income people from ads for your high-end condo because AFAIK income isn't a protected class.