Those factors are tied together and aren’t easily separable. The racism and classism comes in because they believe that people of a different race or class will diminish the value of their investment.
If enough people believe this then it is true. That's just how markets work.
If enough people believe this then it is true. That's just how markets work.