Personally I believe it's wrong and unjust

But right or wrong I suppose the courts couldn't really decide any different given that
"The FDH [foreign domestic helper] is obliged to return to the country of origin at the end of the contract and is told from the outset that admission is not for the purposes of settlement and that dependants cannot be brought to reside in Hong Kong," the Court of Final Appeal said in a written judgement
Same applies here in UK with many Visa categories