Saw Trachy talking about it in his question. Tried looking it up but still a little confused.
All Pokemon can get the moves that they get STAB from. Rotom-W can get Surf and Volt Tackle, for instance.
Also, if a Pokemon changes type while evolving, it gets the moves that the type of its pre evo was. Jolteon can get Shell Smash since Eevee was a Normal type.