You don't tend to get windowless classrooms until decades after the building was built and the school is simply making due with the facilities they have in light of their changing needs. They'll shove a math class in a former art room or something.
Back in the day windowless rooms were somewhat coveted because everyone had lesson plans on transparencies and they'd teach using the overhead projector the way some teachers use a PowerPoint today. Being able to turn down the lights (and not have the sun defeat your efforts) and then have the projector be the main focus helps keep the class on-task and keeps the teacher in better control of rowdy classes because the people who would drift off topic and engage in distracting chit-chat tend to drift off to sleep instead.
[1] https://simple.wikipedia.org/wiki/Overhead_projector#/media/...
US Schooling is very inconsistent and varies a huge amount by municipality.
Day dreaming looking out the windows at the hills or sea was a favourite activity of mine!
But yup, many rooms had no windows; just a big cinderblock room, the only window being by the door, opening into the hallway.
[1] https://old.reddit.com/r/Teachers/comments/6kcily/my_new_cla...