You never know when you might need to say “Help, I’m dying” in a foreign country, and the sooner you learn how to say it in the local language, the better your chances of survival are.
However, your chances of survival don’t depend on whether you know the local greeting or not, since it’s mostly used in a casual conversation, not a life-threatening situation. Therefore, one should 1st learn how to say the phrase “Help, I’m dying”, and then learn the greeting.
Phew! Thankfully I know how to say “Iuuāte mē! Morior!” in Latin. That’ll increase my odds of survival! /s
Okay, I’m clearly joking with the above.
Serious now: OP’s advice is solid; when travelling through a region it’s sensible to know at the very least “help me!”, “danger!”, and similar in local languages, even if you won’t learn the rest of the languages in question.