Grunting, groaning is a means / way of activating your 'core' muscles. that's why Tennis players started doing it years ago.
We do it naturally sometimes, without thinking about it or actually meaning to, when you are pushed, using more power for movement and playing a harder stroke, it just happens.
I think research identified that an 'involuntary' grunt has a couple of attributes (maybe not limited to those below)
1) tensing the core helps protect the body or possibly your back.
2) helps transfer energy/power through your body.
Timo boll gave his 3 top tips in one of his blogs, one of those top tips was to activate your core at impact, which he said helps to produce some extra power and possibly stability.
My Pilates instructor said that tensing of the core helps to protect your back during the exercises. you basically have to try and tense your stomach muscles so that it feels like they are trying to touch your back for the whole of the session, you are not meant to relax them AT ALL for 45 - 60 mins!!! easier said than done!!! then the breathing comes into play, if you hold these muscles tense they naturally tense slightly more (or feel like they tense up more) as you breathe in and want to relax as you breathe out, so you have to remember to keep them tense as you breathe out.
You can tense your core muscles by THINKING about it without a load grunt or groan, but you don't necessarily want to be THINKING about it during a match or rally !! For some its easier to grunt for almost every stroke that requires power.
Carl has way more knowledge on movement mechanics, if I'm wrong about the above he'll pull things back into line.
Is the grunting a tactic?? a distraction?? depends on why the player is grunting or groaning!!!! some opponents may let it get into their head, others just ignore it.
With Tennis it seams to be the norm these days, to the extent of some players are SCREAMING!! excessive?? perhaps!!!!