Swearing is against the rules btw. That it's not enforced for Mugray is just more top player bias.
Anyway, it's a disgrace. As already mentioned, he does it when the opponent is the better player. Often against Federer you see Fed pull off a great shot and the whole stadium is cheering except for Mugray who is making a face and cursing. He has no respect for his opponents or the game, and as Andy Roddick would say he's not good enough to be that arrogant. In a just world, the rules would be enforced and he would lose every match in 2 games max after a warning (code violation), point penalty (verbal abuse after the warning), game penalty (gamesmanship), match penalty (all of the above), fine and ban from ATP (lack of effort).
You do realise that pretty much every player on tour (except for B-Nard) swears during matches right?