"Βασιλεὺς Ἀντίγονος Ζήνωνι φιλοσόφῳ χαίρειν."

Why does it use χαίρειν? Is it to show purpose, or just a habit?
I am a beginner, waiting for someone kind to offer an answer.

The imperative “χαῖρε”, “rejoice!” gets used like English “hello!”

It is often an infinitive at the beginning of letters, as if the author were writing “so-and-so λέγει χαίρειν = says hello[rejoice!]”

Thanks!