There’s a fairly obvious explanation here regarding how those were your formative years and left the strongest mark on you. You experienced a lot of firsts while in school, and you perceived everything in a heightened fashion. But there may also be something broader at play about the sort of experiences we register as part of ourselves.
What proportion of your day do you spend staring at a phone or computer? A considerable amount, surely — maybe even the majority of it. Now, what proportion of your dreams consist of you looking at a screen? Not a whole lot, and many people report that they never dream of that at all. While awake, they may look at an app so much that they see the afterimage of its interface every time they blink, but their dreams don’t feature themselves looking at a screen of any kind. For many people (though not everyone), it seems like this: Your brain won’t register your time alone staring at a rectangle as a memory to draw upon for your nightly adventures.
Now think back to sometime when you lived alone, in a studio apartment or in a single in a college dorm. How often does your dream place you in that setting? Likely never. You might have lived in an apartment alone for years as an adult and never dream of that place but will dream time and again of a different apartment you shared with someone for six months.
The more we interact with others, the more deeply those memories sear into our skull. You dream about work, about parties you’ve been to, about airports. And school was probably the time in your life when you interacted with the most people. You maintained scores of relationships and said hi to all those people every single day. Some people grow up to have even wider social circles, but many never do. Because you were around so many people you knew every day, your mind registered that setting as the most real. And now, any time your sleeping brain puts you among a crowd of people, school seems like a logical place to transition that dream into.