Germany is less surprising to me, given the history involved. Based on what I am looking into on Google Maps, however, it hardly seems to be a phenomenon confined to the US, and at least based on my spot checks it seems to be more common than not for public schools to display national flags.