But by that point the species was already given Lightningrod, it's not the reason why they have it. Unless you're pointing out it has a horn thing which everyone mentioned and that you can thank Blaine's Rhydon for... despite that's being how it was defeated but I guess someone liked the idea of a Pokemon's horn attracting electricity.
All Gen 1 Pokémon who have Lightningrod can trace it back to the Anime - Marowak due to a line in "What kind of Pokémon are you?", Pikachu did this when fighting Surge's Raichu, Seaking as mentioned before and Rhydon is obvious.