See, ZIP files are strange because unlike most other archive formats, they put the "header" and table of contents at the end, and all of the members (files within the zip file) are listed in that table of contents as offsets relative to the start of the file. There's nothing that says that the first member has to begin at the start of the file, or that they have to be contiguous. This means you can concatenate an arbitrary amount of data at the beginning of a ZIP file (such as an exe that opens its argv[0] as a zip file and extracts it) and it will still be valid. (Fun fact! You can also concatenate up to 64KiB at the end and it will still be valid, after you do some finagling. This means that when a program opens a ZIP file it has to search through the last 64KiB to find the "header" with the table of contents. This is why writing a ZIP parser is really annoying.)
As long as whatever's parsing the .exe doesn't look past the end of its data, and whatever's parsing the .zip doesn't look past the beginning of its data, both can go about their business blissfully unaware of the other's existence. Of course, there's no real reason to concatenate an executable with a zip file that wouldn't access the zip file, but you get the idea.
A common way to package software is to make a self-extracting zip archive in this manner. This is absolutely NOT to say that all .exe files are self extracting .zip archives.
doesn't sqlite explicitly encourage this? I recall claims about storing blobs in a sqlite db having better performance than trying to do your own file operations
SQLite explicitly encourages using it as an on-disk binary format. The format is well-documented and well-supported, backwards compatible (there's been no major version changes since 2004), and the developers have promised to support it at least until the year 2050. It has quick seek times if your data is properly indexed, the SQLite library is distributed as a single C file that you can embed directly into your app, and it's probably the most tested library in the world, with something like 500x more test code than library code.
Unless you're a developer that really understands the intricacies of designing a binary data storage format, it's usually far better to just use SQLite.
Nothing wrong with that... Most people don't need to reinvent the wheel, and choosing a filename extension meaningful to the particular use case is better then leaving it as .zip or .db or whatever.
Totally depends on what the use case is. The biggest problem is that you basically always have to compress and uncompress the file when transferring it. It makes for a good storage format, but a bad format for passing around in ways that need to be constantly read and written.
Plus often we're talking plain text files being zipped and those plain text formats need to be parsed as well. I've written code for systems where we had to do annoying migrations because the serialized format is just so inefficient that it adds up eventually.
WEBP images. The worst image file format on earth to deal with metadata and timestamps. FFFFUUUUUCK WEBPOOP (and no AVIF please).
XNViewMP is a saviour on all OSes though, thankfully, being the only tool that can batch convert webpoops to any proper image format with preserved metadata.
Atleast with renamed ZIP files, I literally do not need to care as long as 7-Zip or PeaZip is installed, so I can just "open as * archive". And for video/audio, have MediaInfo installed on any OS. You will thank me someday.
WEBP is very weird to convert to other formats and retain metadata. This is not a problem with JPG, PNG and other formats. And only one tool I mentioned solves that problem.
They both have their use cases. Zstandard is for compression of a stream of data (or a single file), while 7-Zip is actually two parts: A directory structure (like tar) plus a compression algorithm (like LZMA which it uses by default) in a single app.