Why did Bradbury choose a fully automated house instead of a factory or a school as the setting for "There Will Come Soft Rains?"
Questions like this are a bit dangerous because they presume to know the author's intentions, and I think this is never certain unless the author has answered this question specifically. In practice, I think teachers ask this question as an exercise in critical thinking and literary analysis, and usually we can draw some reasonable conclusions, but it's never really honest to say that one's own interpretation is definitely the author's intention.
We might presume that Bradbury chose a house instead of a factory or a school because it was the best way to depict the absence of humanity. Factories can be empty if abandoned, and schools are usually empty in the summer, but we assume that a home will always be lived in, and it will be a hub of activity and emotion. Additionally, showing that the effects of the world in which the story takes place have reached all the way to individual suburban homes shows how extensive the war was, and how sudden and devastating a reversal of standards it enacted; society went from automation and comfort to nuclear apocalypse in less than a day.
The choice of a home also allows us to see and discuss intimate details of the occupant's lives, such as their taste in poetry or the father's habit of smoking a cigar after work. These nuances would not have the same effect, or would be out of place, in a different setting, and help to personalize the home and make the loss of its inhabitants more palpable.