They developed software that was better than the competition (Netscape) and they gave it away for free.
IE was free in the sense that the transmission in my car was free. Sure I never got an itemized list that said
Transmission: $579.89
but you can bet I paid for it.