If only it were that easy! If offices could be easily converted to residential, then the current market conditions would be incentivizing owners of all these vacant office spaces to be pressuring for re-zoning and conversion right now. Unfortunately, many office spaces are ill-suited for residential conversion.
There's often not enough plumbing. Often very literally, as in the main sewer, and municipal infrastructure, are undersized for residential use. Also, once you add adequate walls and dividers to separate the units, plus furniture, packed into typical apartment sizes, the weight is usually much more than for an office, often more than the structure is rated for.