While most of the time, fighters Smash Bros. have similar attacks, animations, etc. that they do in their games, there are some cases where fighters have attacks that are made up. Smash Bros. is a non-canon game, it doesn't necessarily have to follow the rules of the games that the characters in it are from. This is why the Pikachu in Smash Bros. can use Skull Bash.
There are actually a few more cases in which Pokemon in Smash Bros. have attacks that they cannot learn in Pokemon games. Like Pikachu, Pichu also can use Skull Bash. Pichu also has Agility (Instead of having Quick Attack, like Pikachu does.) as its up special. Using Agility also causes Pichu to take damage, despite not being an Electric-type move. Although not necessarily illegal moves, there are a few attacks that Pokemon fighters have that were made up for Smash Bros. Some of these include Pikachu's and Pichu's Thunder Jolt (Neutral special), Jigglypuff's Final Smash, Puff Up, Lucario's Final Smash in Brawl, Aura Storm, and Greninja's Final Smash, Secret Ninja Attack. I would also like to point out that, in every Smash Bros. game, Jigglypuff's Rest, instead of healing like it does in the main series Pokemon games, launches your opponent very far.
TL;DR: Smash Bros. doesn't care about the rules.