It's "free" because the cost is built into the hardware---MS had licensing terms that made selling hardware without a license a poor choice. As a result, it was preinstalled and no one looked at any alternatives.
It wasn't free: the user was forced to pay for it built-in to cost of the machine even if they intended to use a different OS. That's much worse than free.