In the real world the technology industry does tend to have higher margins than other industries. There might be perfectly normal explanations for that, such as network effects, but there are also government policies that have the effect of reducing competition. For instance, intellectual property laws reduce competition in order to attempt to encourage innovation. The strawman version of capitalism doesn't exist in the real world. Margins can remain high for some time.
That being said, there are competitors for Microsoft's bread and butter products. If you want an alternative to Windows, try Linux. If you want an alternative to Office, try Open Office. For many users, however, they get a better experience with the Microsoft products than these alternatives, even though they are free. Microsoft has to keep making their products better than the alternatives or people will use others (though there are costs of switching and network effects that mean that MS probably doesn't need to have the absolute best product on the market in order for customers to keep using them).