It's not a bad idea, but due to zoning, there's usually not office space near neighborhoods, and schools are usually the most durable and identifiable parts of a community. Just like people that own 2 cars take fewer Ubers, a school district that already owns and operates a bunch of real estate has an incentive to either expand it or use it more intensively vs taking on temporary obligations with unknown future budgetary consequences.
After they get rid of all their lunches, lockers, libraries, laboratories, music programs, theater programs, shop programs, and athletic programs. Also after finding a landlord willing to comingle enterprise tenants with hundreds of loud children, and superimposing a school zone over an office building through regulatory alchemy.