Where do you think that JS in a web page comes from? Not from the network?
Service workers are a cache (and background process), and you still have to consider cache misses. Even if you have a giant JS app and cache it, users still have to download all the JS to actually work offline no matter what.
With service workers and client side storage you can get to display at least a shell, sometimes the entire UI without touching the network. It is a lot faster