These sort of tests are fairly routine, and as the Washington Post points out, this isn't the first time the Boeing team has created a flight plan that "draws" something special. In fact, in February during a test flight of the Boeing 737 MAX it spelled out "MAX" over Washington and Montana.
According to several outlets, this Dreamliner flight was designed to test out a set of new Rolls Royce engines. To do so, it set out to cover 15,766 miles over the course of 18 hours, making a longer and more far-reaching flight than the longest commercial one in the world (that would be the 16-hour flight from Doha, Qatar to Auckland, New Zealand, which covers just over 9,000 miles).
And while flight tests are no-doubt critically important for many reasons, it's easy to imagine that being in the air for nearly a full day without actually "going" anywhere would grow incredibly dull, so good on Boeing for at least giving the pilots a marginally fun mission.
h/t Washington Post