Why do we install software via `.dmg` files?
DMGs have a few key features which make them superior to plain old zips


They’re a full file system (meaning they can store file permissions, have custom folder backgrounds, etc)
They support “mandatory” EULAs before mounting which is nice for legal stuff
Provide a more reliable execution environment. If you have to do absolute path stuff for installation (which tbh you shouldn’t) you can prepare the DMG, mark it as read-only and use that to install


Really the key feature is that they support the full HFS+ filesystem. Zip (commonly, Linux versions sometimes support permissions) is stupid and only supports bundling files and folders and nothing else. No metadata, just the files.