@hellomiakoda Oom isn't exactly the smartest process, and although it's a bit anthropomorphic to describe it this way, I think of it as the computer looking at ram supplies, having a panic attack, grabbing one if the tasks and chucking it out the window to resolve the situation.
And of course by Murphy's law, it'll pick the task you least wanted interrupted.