Bad schools means the student population comes from households with low incomes, and hence are less likely to have home environments preferable for schoolwork compared to home environments areas with households with high incomes. i.e. "You are the company you keep", so people try to ensure their kids are surrounded by other kids with economically secure families, in the hopes that their influence will lead to higher probabilities of success.