Why did this plane fly in a zigzag pattern?
Alrighty then, that took some detective work.
Here's another flight around the same time, SkyWest 4458, which arrived 2 minutes later. Notice it's one deviation, compared to two deviations in your example.

Weather seemed fine, but KSEA has TBFM (Time Based Flow Management) since Aug 2013. If the ATC asks a plane to delay its arrival time, the way it's done is to deviate from the route, then get back on it again—that's if slowing down alone won't meet the time target.
Pilots then use the RTA (Required Time of Arrival) function of the FMC. Initially the function was rarely used, but now with NextGen in the U.S., SESAR in Europe, and similar systems elsewhere, it is frequently used.
It can be arranged way ahead of the airport, i.e., it can be ordered by the approach controller, yet the center controller of another ARTCC delivers the message.
It looks exactly like that. Deviate, if not enough, deviate the other way.
Behind the Scenes
The system is called ERAM (En-Route Automation Modernization).
ERAM detects future conflicts, and based on that, traffic is asked to speed up, slow down, or deviate to slow down further. It reduces/eliminates hold time.
Europe—the first to use it in 2012—refers to it as initial 4D trajectory management. Planes arrive at waypoints at agreed times.
For whatever reason—most probably sudden traffic influx—they were asked to slow down.

The difference between this, and the regular vectoring/doglegging in the terminal area, is the way it is predicted, coordinated, and then relayed to airplanes far from the airport.
Below you can see as the jet turned, it slowed down as well. The initial upward spike is just the tailwind when the plane turned.

Source: flightradar24.com