It weakens Electric type moves, but why have it on a bunch of Ground types. What is the point of having a move that weakens an attack when those types of attacks (Electric type moves) can't even damage you (Ground types)?
There are actually a few reasons why so many ground types learn mud sport even tho they can't make use of it.
Because mud is considered part of the ground. Logic.
stephwheel8-
You may say: "well that makes logical sense but not at all when it comes to game mechanics" ground types can still make use of mud sport in game mechanics, here is how:
Also remember that double battles exist, and a team could be made up of, say, a ground type and a flying type.
One thing everyone forgot about are contests (mainly because they suck).
Mud Sport can also be used as part of a Pokémon Contest combination, with the user gaining extra four appeal points if any of the moves Mud-Slap, Sandstorm or Water Sport was used in the prior turn. It can also be used to start a combination, causing the base appeal of Mud-Slap, Water Gun and Water Sport to be doubled if used in the next turn.
Bulbapedia-