Could well be the US government wouldn't clear the flight to land because of passengers on board not having visas, some being on suspect lists, etc. Not being a serious emergency YYZ was the best option on many counts as C2 has laid out. Frustrating but that's how it is today. AC banks on heavy loads on its SAmerican routes from local residents who can't be bothered getting US transit visas. These rules killed what was Iberia's critical MIA hub and AC has benefited. MEX was too far and couldn't handle the traffic IB used to provide MIA.