Most of the time a grunt is not to greet you happily (that I have ever heard of)— HOWEVER, you could have accidentally trained him to reflect his happiness via a grunt since he gets treats and love then or that his threats work for treats and love!
I can tell you I accidentally trained Jack this way. Over time he realized he gets head pets with or without the grunt, so he eventually stopped. And if it wasn’t about using the grunt as a greeting, still as a threat, it also could be that it took him that long to realize he didn’t have to threaten in order to get love and treats.
It could also just be that he saying “I’m happy to see you, but I am obligated to warn you first!” LOL!
Note: A little head-shake can also mean…”Don’t like what’s going on” but usually they leave right after that, where as a happy – mini head binky is YIPPEE – Treats, treats, treats! And then that head shake is usually followed by them coming toward you or they run around first in excitement and then return right back. Jack does that right before his treats! Well, he will also do full blown binkies too in anticipation, but they start with the head-shake.