This is a problem for anything that draws together lots of people from a large area into the same place - trade shows, sports events, music festivals, cinemas, conventions, busses and trains, food stores, beaches, universities and schools.
We almost certainly haven't hit on the most optimal solution - in my country we closed schools, yet keeping crowded metro trains running? - but it wouldn't have been wise to wait for more data to come in before taking any action.
So yeah and essentially that by keeping contact limited if someone does get sick you only need to quarantine a limited set of people and close a classroom rather than the whole school. I feel like a lot of the success here has been in being aggressive with contact tracing and people able to take the social responsibility to self-quarantine.