They did it by one simple trick - becoming the first ones who offered free license for open-sourcers. They invented this idea. After that, they needed to do nothing more, almost automatically becoming a monopoly.
I was there working for one of the early competitors who was thrown in the dust by that decision of Atlassian and was too late to realise they had to do the same - and folded two years later.