I believe this is how Microsoft implements verification so that users do not have to remember their passwords. You can probably disable it in Security > Advanced security options > Send sign-in notifications.
Personally, I find this very convenient, especially when logging into a new device/app/service for the first time. However, I imagine that if someone else is trying to get into my account online, it would be the first thing I disable, switching back to entering my password by default.
XSS vulnerbility hack. From a mod:
https://lemmy.blahaj.zone/post/766402