I can see the sense of this in Windows where closing the last window will quit the app too, and starting up again is not just a matter of clicking on a Dock or task bar icon.
For example, in our app, starting up again requires the user log in again, quite an annoyance if you didn’t mean to quit. We show a “Are you sure ” dialog on quit, but there is a preference to turn that off. I turn it off on the Mac where quit requires a menu action, but leave it on in Windows.
Some browsers will do this automatically if you start typing in a field on the page and then try to leave.
I find it annoying, as I’ll often type some rude or sarcastic remark, realize I need to not say that, and leave the page