The disturbing proximity of schools and a nursing home to a hazardous facility is not unique to West, TX. I recall hearing years ago that you could trace major faults in the Los Angeles area by drawing lines between the hospitals. Land along fault traces is cheaper and attractive for things like schools, hospitals and the like.
Since that fertilizer plant had been there a long time, I’m guessing the house construction moved toward the plant over time and then someone noticed that there was land available there that would give lots of room for playing fields and buildings and it just seemed reasonable to put schools there.
This is why we need zoning.