As the first two answers have already stated (La)TeX has become the defacto standard in several areas because it is basically good at what it does, fairly natural to author and freely and widely available.
It's also I think instructive to see where (La)TeX did (or has) not become ubiquitous. @stephan-lehmke mentioned MathML. The downside of TeX being so flexible (which is what makes it excellent as an authoring format) is that it is hard to process with anything other than TeX (and hard to convert to anything other than a printed page). Many Journals, even if accepting TeX from authors (to make it easy for author submission) put the documents through complicated and error prone conversions to internal SGML formats (or in some cases simply printed the documents and had them re-keyed in those formats). Having an open widely available format like MathML allows the tooling around an XML/SGML Math markup to be more easily shared (and improved).
MathML (rather than TeX) is part of the EPUB standard for electronic books, the DAISY standard for audible/accessible electronic publication, and part of HTML5. It underlies the Math formatting in OpenOffice and other ODF based office suites and it is supported as cut and paste of mathematical expressions in MS Word and the Math input panel. MathML doesn't compete with TeX in any of these areas as TeX simply was was not considered, primarily as it is just too "different" to fit into workflows that are not totally designed around the TeX processing model.
Conversely when it comes to typesetting MathML, TeX is still probably the best mathematical typesetting system there is.
Probably I should mention in case it isn't obvious, that I have various conflicts of interest here, as a member of the latex3 team responsible for LaTex2e and an editor of the MathML specification, so these comments can't exactly be considered an impartial review