Gorillas beat their chest as a warning to potential rivals not to mess with them otherwise they'll get taken down-town and put in their place. I imagine those tennis players do it for the same reason.
Watching Djokovic his celebrations look very primal to me indeed, funnily I find Nadal very primal in his mannerisms as well. It isn't surprising that some of the very top players have those rather primate-like tendencies since being like so will naturally make them better athletes.
its an alpha male thing thats id guess is encouraged by their coaches....to outpsych an oponent. smart players would show the same arrogance in reply... body language usually sorts them out...allied with better tennis of course.