The overlap of teaching skills and DMing skills is so intriguing to me. This time I was thinking specifically about the similarity of managing a gaming group and a classroom. Many times your classroom will have learners of differing levels of knowledge, skill and willingness/ability to engage, and part of your duty as a teacher is to ensure that your lessons are balanced in such a way that you lead all of these people to the common goal of, idk, being able to write a paragraph describing their daily routine. You'll have those who only think about the present simple tense when sat down in class, and those who turn the language over in their brain for funsies and only need a nudge or two in the class setting, so your material and the way you relay it to your learners has to be balanced for that. In a classroom setting, you could probably assign a bonus exercise or two to keep the eager/practiced learners engaged, giving the others the chance to use the full allotted time to engage with the material in the way that works for them.
While as a DM, where the common goal is to guide the players through the story, it may not be so literal (or maybe it is! Throw a puzzle or flash mystery at the eager ones in a session) - it might involve pulling on your people skills and knowledge of your party to satisfy the interests and motivations of the players and their characters in a balanced and harmonious manner that makes them want to stay when they have full agency to get up and leave. For example, giving your player who is super busy outside of sessions to have a role in the story that lightly touches on the main plot which enables them to keep track of events session-to-session and lets them engage in what intrigues them most about playing (roleplay, exploration, some combat, whatever), while other players can focus on the more plot-heavy lines to carry the story forward. The DM thus is creating a space where everyone can enjoy themselves and be willing (hell, even eager!) to compromise.