Things like redlining are no longer legal, but the desire by people to exclude people that they do not want their kids to end up like remains. One legal way to do this is to make the cost of living sufficiently high that it guarantees your neighbors conform sufficiently to society's standards that they were able to accumulate wealth.
Here's a podcast episode on the particular issue if anyone wants to explore more
https://www.strongtowns.org/journal/2024/3/18/benjamin-herol...