Japan has a bunch of set phrases.
Walk into a store, and you’ll hear the welcome “irasshaimase”/いらっしゃいませ!
When you leave the office you’ll hear “O-tsukaresama desu”/お疲れ様です to acknowledge your hard work.
Or meeting someone for the first time will start with “Hajimemashite”/初めまして and finish with “yoroshiku onegaishimasu”/よろしくお願いします.
These phrases avoid any awkwardness and you always know the right thing to say in the situation.
Imagine you walk back to your office and everyone is on the phone and no one makes eye contact but you feel like you should let them know you’re back?
No problem, “tadaima”/ただいま is something you can shout to everyone and no one. You’ll often get the “okaerinasai”/お帰りなさい back to welcome you back.
Also, when you leave you can say “ittekimasu”/いってきます and everyone will respond with “itterasshai”/いってらっしゃい.
Here’s a blog detailing a bunch of set phrases and their loose translations.