In American culture many people hug ...
Word List: US Culture (Your culture may be similar.)
In American culture many people hug when greeting when hearing good or bad news when saying good-bye and more.
College student: I'm so sad ...I didn't get into the sorority that I pledged.
Friend: Let me give you a hug ... It's alright.