Microsoft Office has never been free per se. But back in the early days of Microsoft Office, one person could buy a copy of Microsoft Office and then share it will an unlimited number of friends and none of those friends had to pay for it. So you are possibly referring to the grand "old days" of Microsoft office.
What you need to do is read up on the anti-trust lawsuit against Microsoft. The U.S. Govt battled Microsoft for over 20 yrs on anti-trust with respect to Windows and IE. At the same time, in a separate lawsuit, Microsoft was charged for using its dominance to push other software products as well, including its office suite programs as well as its e-mail software. After all of this was finally settled, shortly after that Microsoft had to then stop allowing their software to be spread around "free" and therein was born the days of having to pay for every single copy of their Office program. So you can thank the Govt for this due to these lawsuits.
Ultimately in the end I suspect we would have eventually had to start paying for all copies of Microsoft Office anyway. Programmer salary costs alone that Microsoft was having to pay would have forced them to have to try and recoup these costs via sales.
All this said, if you aren't willing to buy Microsoft Office, there are generic versions of Office on the market that are free and do just about everything Microsoft Office does. The best on the market in this class is Libre Office. That is here
https://www.libreoffice.org