Of course it's related to the format. Many formats, like PNG and Gemtext, are inherently self-contained, while other formats, like HTML and SVG, are not.
Annoyingly, EPUB isn't inherently self-contained [1], but external access is explicitly optional [2], and it does make self-containment easier, because you can reuse resources across multiple pages, whereas HTML requires you to either duplicate the resources across multiple pages, or you have to build your thing as a single massive HTML page.
Annoyingly, EPUB isn't inherently self-contained [1], but external access is explicitly optional [2], and it does make self-containment easier, because you can reuse resources across multiple pages, whereas HTML requires you to either duplicate the resources across multiple pages, or you have to build your thing as a single massive HTML page.
[1]: https://www.w3.org/TR/epub/#sec-resource-locations
[2]: https://www.w3.org/TR/epub-rs/#sec-epub-rs-network-access