There is a difference between what is legal and what is moral. If you think that there is no difference you also hold that slavery was moral up until the time it was illegal (and you might then wonder why abolitionists campaigned against a moral act.) Similarly, the visa system may have always had this uncertainty but that does not mean it is moral, or that it is moral to use it in this way.
Who said it was moral?
That is the implication of what conductr wrote.
Better talk to Bhutan