With a service worker, you can stream the header part of a new document instantly from the service worker, while fetching the content. That essentially makes an instance first paint.
I don't think that's what the example is showing, though.
That's a good point, I didn't consider having the browser cache the document. That means you can achieve the same thing with the HTTP cache. (I'm not sure if the retention logic between the service worker cache and the HTTP cache differs much.)
Service workers give you more control about what's in the cache, for example you can serve a stale version of the HTML and then fetch an up-to-date version in the background. But since last year you can also use `Cache-Control: max-age=1234, stale-while-revalidate=86400`, so it should be possible with the HTTP cache as well now.
Why would you need a service worker for this? Doesn't the regular browser cache achieve the same thing?