Borders (local+international) were closed before there was a major influx of infected persons.
We've had hotel quarantine for ~all entries into the state.
The level of infections has been low enough that contact tracing was never overwhelmed.
The level of testing has generally been very high where outbreaks occurred.
The level of compliance with stay at home/limit travel has generally been pretty good.
And a a major factor is that we've been very lucky.
Still, there's been a lot of businesses severely impacted. Those that were already on the edge and either unable or unwilling to adapt, or were not able to make their new processes profitable have gone under.
e:
Also, lets not forget that Victoria (Melbourne) had a broadly similar situation. They were unlucky in that their hotel quarantine process was poorly managed and there wasn't a strict adherance to quarantine protocols. This was a major trigger for their massive spike.
Anyone thinking this couldn't happen here in NSW (Sydney) is fooling themselves.