What's the benefit of this long flight (apart from marketing)?
From the this link:


  At 15:38 local time N7874, the fourth 787 built, departed Boeing Field in Seattle for an 18-hour, 22 state test flight. The crew spent the overnight hours above the United States performing ETOPS testing on the new Rolls Royce Trent 1000 TEN engine, which will power the 787-10.


Also this video from the above flightradar blog link.

The 18-hour flight was to test ETOPS, and there's no harm in some marketing as well. Also since the flight will be coming back to Seattle, it makes sense to keep the flight above the US, and near airports. Compared to venturing out in the ocean on a test.