It is very common in almost all modern operating system that some programs use a windows that "interrupt" whatever the user is doing, stealing focus to itself.
For example, I was just writing code on VS Code when the modal for updates stole the focus and I ended writing the rest of the code line into the password input.
This behavior happens in a lot of products. I remember for example writing shell instructions on a terminal, someone send me a Skype message and Skype stealing the focus: end result, I wrote "git commit --amend" on a Skype message.
I think this is really bad UX design, and I want to investigate more about it (maybe there is a good reason for this), but I do not know even the name. It would also be helpful to know who invented this.
I appreciate your help.