Also, a binary format like .doc is much more compact and faster/easier to parse, and in the 80's and 90's, computers had much less memory and processing power than they have today.
Today's Microsoft Office formats are based on XML - a .docx/.xlsx/.pptx file is a zip archive containing a directory tree of XML files (plus some binary data such as bitmap images).
The reason it wasn't always the case was that the .doc format was initially developed before HTML and XML.
The first version of Microsoft's .doc format was developed in 1983.
HTML was released in around 1991, after being developed through the late 90s, and XML emerged in the late 90s.
To be fair, Microsoft was reasonably fast to move to XML-based formats once it was clear XML was becoming an industry standard.