Unless your ex ASL or a freighter captain apparently. Then

seniority.
Oh dear, this hairy old chestnut. I won't comment on ASL, but freighter commands were also offered in seniority order within CX. They just went very junior because of the undesirability of the roster and the abysmal pass rates (esp. on the classic). Also, guys already based in HKG and in receipt of housing had less incentive to go for a freighter command on a base as they would have lost said housing, and anyway for much of the last decade pax commands in HKG were coming in at the 8 or 9 year mark, so not long to wait (of course since then, and despite the zoologist's assertions, inexplicably age 65 has
not decreased time to command; funny that)
In the same way Airbus commands were recently going fairly junior, and for much the same reasons. As long as commands are offered in seniority order and people retain the ability to turn them down and wait for something they prefer, this is only natural, the command will be offered to the next guy/gal in line.
I agree with Arfur, in my view there is nothing wrong with an F/O declining to come to HKG for a command, waiting for sufficient seniority to hold command on his base, and then bidding for command directly on that base. No-one disadvantaged. As many have pointed out, most US carriers (not to mention BA!), operate with this logic.
Also consider that if said F/O does accept to come to HKG and then fails command, he/she has now lost the base slot and must remain in HKG...