A Lawful Good Rules Lawyer can also be a valuable thing to have in your gaming group if one or more of the players in your gaming group cheats or doesn't RTFM.
Even when the rest of the group is on the level, the fact that a Rules Lawyer will, by definition, know all of the rules can make them useful for a gaming group as the ultimate natural language database.
Most annoyingly, they seem to remember only the parts that support whatever they're doing at that moment, intentionally ignoring whatever doesn't support their own case, and usually bringing it up when they're threatened in some way. They are among the few people who Read the Fine Print.
See My Rule-Fu Is Stronger Than Yours for the argument that is going to happen at some point, especially if there are of them at the table.
They'll constantly grind play to a halt to make sure that everyone is following the rules even if the end result would be the same anyway.
However, this trope does come in a positive variant referred to as the Lawful Good Rules Lawyer: they always stick to the rules, no matter how bad it might be for them personally.
If a rule ever seems to be written rather verbosely, or explain things that seem like common sense, it's the writers trying to stop these guys.
The Lawful Stupid Rules Lawyer is incompetent instead of malicious.
Besides being of any moral alignment at all, what all versions have in common is a nigh-encyclopedic knowledge of every single aspect of the rules of the system.
The difference between the three is largely down to attitude and how they use that knowledge.