If the reason is something that money could solve, then I always encourage the company to offer more.
An example of this might be "I wasn't looking, still don't feel like I am. But company X asked me to look at a role, and I felt I shouldn't just ignore and it turns out they're offering $ and whilst I don't really want that role I would be a fool to decline it out of hand as that difference helps achieve <insert life goal>.".
In that case... if the company can do it, do it.
But if it's more "I went looking for something else and I hate this job, and this other stuff winds me up, but if you gave me all this extra money I'd suffer it a while longer"... then the company should wish you well and if they understand fully how toxic you now are to the team would let you leave that same day.
I really agree with this. Your exact example -- every detail -- happened to me a few years ago. I was offered a ~50% raise without really seeking it out. I went to my boss (with whom I had an excellent relationship) and explained the situation. I got the raise that day, and over two years later I've continued to get great raises/promotions, and it has become the best job I've ever had.
It is important to note that I was doing really important work at the company. I was probably not considered a "normal" employee.
If the reason is something that money could solve, then I always encourage the company to offer more.
An example of this might be "I wasn't looking, still don't feel like I am. But company X asked me to look at a role, and I felt I shouldn't just ignore and it turns out they're offering $ and whilst I don't really want that role I would be a fool to decline it out of hand as that difference helps achieve <insert life goal>.".
In that case... if the company can do it, do it.
But if it's more "I went looking for something else and I hate this job, and this other stuff winds me up, but if you gave me all this extra money I'd suffer it a while longer"... then the company should wish you well and if they understand fully how toxic you now are to the team would let you leave that same day.
It depends. It always depends.