For Windows, distribution without signing isn't exactly painless either, and the signing certificates for that are quite expensive.
And there, it's not even deterministic, see https://www.digicert.com/dc/blog/ms-smartscreen-application-...
The goal of the system is to authenticate which developer made a given piece of software, to be able to track the spread of malware. An option is always given for a user to opt-out.