A season is almost never shot in the order it will be watched. The schedule is built around where the cameras are rather than around what happens next.
Locations set the order
Moving a production to a location involves transport, permits, equipment and a substantial number of people, and the cost is largely the same whether one scene is shot there or twenty.
Every scene at that location across the whole season is therefore shot in one block, regardless of which episodes they belong to.
Standing sets in a studio work the same way, with all scenes in a particular room grouped together to avoid dismantling and rebuilding.
Cast availability compresses further
Performers appearing in a few episodes are booked for a defined number of days, and those days are used as efficiently as possible.
Their scenes are gathered together even where they sit at opposite ends of the season, which is why a supporting character can complete their entire year in a fortnight.
Guest performers with other commitments frequently dictate the schedule outright, since their availability is the least flexible element in it.
Performers track their own continuity
An actor shooting out of order has to know precisely where the character is emotionally in each scene, without the accumulated experience of having played what came before.
This is a substantial part of the craft, and it is why performers keep detailed notes and consult continuity staff constantly.
Physical continuity is tracked formally, covering costume, injuries and the length of hair, because a mistake becomes visible only in the edit.
Directors change between blocks
Television episodes are commonly directed in blocks of two, with a different director for each block across a season.
Because blocks overlap, one director prepares while another shoots, which is how the schedule fits into the available months.
Consistency is maintained by the showrunner and by the cinematographer, who typically remain across the whole season, rather than by the directors.
Why the finale is sometimes shot early
If the finale returns to a location used at the start, or requires a performer available only at a particular time, it will be shot when that is possible.
Weather and daylight impose the same logic, since a scene requiring snow or long evenings has to be shot when those exist.
The consequence is that a cast can play the emotional conclusion of a season before they have shot the events leading to it, and the finished episode conceals the fact entirely.