I'm a computer science teacher trying to understand the benefits of subnets. I understand how subnets are defined and how it can be determined using a subnet mask whether two hosts are on the same subnet. When I read about the benefits of subnetting, most answers begin "When a host on a network wants to communicate with another host...". My question is, when does a host on a network really want to communicate directly with another host on the same network?
When I send an email, for instance, the recipient can immediately access it whether they are inside the network or not, so it has to be getting out onto the internet. The same happens if I upload a file to OneDrive or Google Drive. I estimate, perhaps wrongly, that the large majority of my school's network traffic is of this type. When services are hosted externally like this, all traffic is going out onto the internet, so what is the benefit of dividing your network into subnets? What type of traffic would it be beneficial to limit to the same subnet?