How did they accumulate such wealth without first controlling that market?
I would say they did control that market - right from the day Intergalactic Digital Research blew the chance to supply the IBM PC Operating System. Bill Gates grabbed his chance, offered to supply the OS as well as the languages (which was all they were originally going to provide) and the rest is history.
As an aside, I find the whole story of the IMB PC project, M$ buying (not writing) QDOS - which became PC DOS 1.0, IDR losing everything over the non-disclosure agreement and all the rest of it fascinating. See
this for more on the story.
Confused ? You will be...