That’s because the api is badly defined, the javascript call to ask for notification is syncronous so the browser need that annoying blocking popup insteas of something less invasive like the popup notification
The javascript call to request notification permissions is async (returning a promise in newer browsers, callback in older ones).