I live in a condo complex that used to be a high school.
We all have electric heating and cooking, because there wasn't gas connections (which is annoying, but tolerable). We all have 14 to 16 foot ceilings (which is actually kind nice). The bathrooms were all somehow renovated and some plumbing rerouted. We have shared laundry downstairs (which sucks, but not as much as living in a tent city).
Someday there should be an actual HN article by an expert breaking down what's involved to renovate an office into apartments. It's clearly not impossible.
Nothing is impossible given enough money. But on the whole, it is much easier to convert hotels, motels, and I suppose high schools given that they are already subdivided into rooms of a decent size and each room has natural light.
The issue with commercial offices is that the buildings have gotten larger and larger, but residential building depth will max out at around 45 feet, leaving a massive unusable interior.
Offices want large, flexible open-floor plans with the only plumbing being floor-wide mega-bathrooms. The two just aren’t compatible.