Why might an airliner fly a large U-turn before landing? I was on a flight1 from San Antonio, TX to Toronto and, when arriving in Toronto, the plane went quite a way past the airport, made a big U-turn, and then landed. We were coming from the west.

I thought it might have been a need to adjust for the runway, but as I said, we went quite a way past the airport, meaning after the turn we had to fly "a little bit to get back to the airport". All that even before starting the process of descending for landing (if it was just a matter of adjusting the direction for the runway, what would be the need to keep the high altitude and go so far to make the U-turn?).

Does anyone know the reason? It seems that some flights coming from the west do that move.



Air Canada 7722, October 8, 2017 (history will not persist)

(flightradar24.com) Image shows the flight's route with a final left U-turn prior to landing.
Airplanes prefer to land in a headwind. This reduces their groundspeed compared to landing with the same tailwind.

Braking distance grows quadratically compared to groundspeed. So any significant reduction in groundspeed is worth having.

Successive airplanes should all come from the same direction to land. This removes any danger of collision when a plane fails a landing and goes around into what would otherwise be oncoming air traffic. Planes also prefer to take off into  headwind, so if takeoffs are intermingled with landings (very common in a busy airport) they won't interfere with each other if they all go the same way.

The tower monitors the wind and then decides which way the airplanes should come in to land and directs landing craft to land from that direction.