they allowed you to transit because you went on cathey (flag carrier of hong kong ) and you have a visa to aussie. same case with those have visa to countries like usa , canada , korea , new zealand , japan and uk. you will still need a transit visa if you dont fullfill this requirement.