Here you can see all 74 occurrences of the verb in the NT. As you say, the primary meaning is “rejoice” or “be glad”, but it is also sometimes used as a form of greeting, possibly originating from something along the lines of “I’m pleased to see you”.
Of those, the 2nd Person Singular Imperative is only used in addressing Jesus as Master (Rabbi) and King, and once to the Queen Mother, for all the kings in the line of David have recognition of their mothers in the Scriptures.
A king (or master or queen mother) is never commanded to rejoice, nor anything else. But “Hail” is proper. It is Gabriel who bent the knee before Mary; he made no commands.
Χαῖρε is only said to a superior in humble respect (or in defiant sarcasm to insult Jesus)
I remember that at seminary; and it troubled me years later realizing how rare the greeting in Greek writings but how common in language class. It is a greeting giving honor, not a notice of presence, like “hello”.
DISCLAIMER: Catholic Answers has turned over the archive to Catholic-Questions.org and no longer owns, manages, or moderates the forums. For additional apologetics resources please visit www.catholic.com.