They are essentially the same, apart from the fact that
- Trick is a Psychic move
- Switcheroo is a Dark move
- Trick was introduced in Gen III
- Switcheroo Gen IV
- The Pokémon that learn them,
Other than that, there are no major differences, their animations are even very similar:
As for why they made two near identical moves, no one can tell you apart from Game Freak, no real theories on this one.