Hey is a multipurpose word.
Can be used to get someones attention, To say hello, and
Can be used as a bristling retort.
The "hello" version took me by surprise the first time I heard it. I went to south GA with a customer to visit a paper mill. Every time one of the mill workers walked by, they'd say "Hey". No exclamation. Just "hey". I'm looking around for some one sneaking up behind me or something. 10 minutes later, I was
Hey-ing back. Very contageous!
That was also the same trip some #@!!@%% talked me into eating deep fried gizzards. That and okra are where I draw the line. Although I am very fond of deep fried sweet pickles!!