Why was this commercial jet accompanied by small plane near Seattle?
It's a Fedex 777F N894FD in (probably) pre-delivery aerial photography/test flight accompanied by one of Boeing's chase aircraft.

After some maneuvers (shown below), the plane headed to MEM, Fedex's "SuperHub".


(Source)

The flight on flightradar24: https://www.flightradar24.com/2019-07-24/03:16/12x/FDX9032/2168b4b1 and flightaware: https://flightaware.com/live/flight/FDX9032/history/20190724/0215Z/KPAE/KMEM