>>46377271I always interpreted Golem and Machamp specifically as being due to a glitch in-universe.
Machoke and Graveler swap characteristics to get their final forms.
Similarly, a lot of the trade+item evolutions feel this way. Trading a Scyther with a Metal Coat scrambles the Scyther's data with the metal it is traded with. Trading Seadra with a Dragon Scale causes the program to misinterpret the data from the dragon scale as part of the pokemon. Porygon gets patched with the update data when it gets reduced to a purely digital state again.
Besides that, Haunter is an indeterminate mass of stuff and ghostly energy, that the digital trading process "fixes" into a single, physical entity to correctly process.
There are a few that don't work, like Alakazam, Slowking, and pretty much anything not Escavalier or Accelgor from later gens, but it always made sense to me.