Some players new to Pokémon wonder why certain features work the way that they do in the game. One of them is when you trade certain mons, this will cause them to evolve.
New experiences help us grow, and same goes with Pokémon. But not all experiences are good.
Haunter needs th despair and sadness it feels from being sent away by its trainer in order to evolve into Gengar.
Machoke needs grief mixed with loss of the trainer to achieve stronger willpower, this allows them to evolve into Machamp.
Kadabra gains depression by being traded, this leads to psychotic powers allowing it to evolve into Alakazam.
Graveler evolves into Golem but this can only happen through a trade when its heart is cracked and broken, causing immense stress.
There's only so much they can experience with one trainer, so by being traded away into the hands of another trainer, they learn a lot more, triggering their evolution. It could be the sadness of being traded away that contributes to this experience, it could be the ability to learn how to trust another trainer.
But this is all fine and good, a little on the sad side, and a little stupid in my opinion because it is basically on and off, you could have a bad trainer who treats them poorly and trade them to a nice trainer, this would be the opposite, and it wouldn't create the desired effect, yet, it does.
The real reason it to encourage players and kids to buy the link cable and trade with friends. So you have to trade them so that the Pokémon Company and Nintendo make money.