Apple's internal justification for this is that the iPhone and iPad are consumer devices designed for maximum comfort and safety, whereas the Mac is a device designed for developers and professionals. From their perspective there's legitimate demand for both, and they serve both market needs.
BTW you can't download and run arbitrary code on your Mac unless you break out a terminal and do developer-y things, because notarization has been a requirement on macOS for years. There is no clicking through scary warnings. macOS will simply tell you that an unnotarized app is broken and refuse to open it via any GUI path that exists. You'll have to strip the quarantine xattrs at the UNIX level to bypass it.
BTW you can't download and run arbitrary code on your Mac unless you break out a terminal and do developer-y things, because notarization has been a requirement on macOS for years. There is no clicking through scary warnings. macOS will simply tell you that an unnotarized app is broken and refuse to open it via any GUI path that exists. You'll have to strip the quarantine xattrs at the UNIX level to bypass it.