In wheel motors have high unsprung mass, which has negative effects on the performance of the vehicle and ability of the suspension system to keep the wheels on the road in particular. It is difficult to actively cool a motor in the wheel as well, although you would have an easier time with radiated cooling at least.
Also, wheels are the most exposed part of the vehicle! It is much safer to keep the motor inside where there is less dust and road debris.
Thanks. Wasn't there a study done regarding unsprung mass that suggested the effects may not be as bad as feared and vehicles could be tuned to compensate?