I went through a similar struggle to how I read your story. I had a cushy job that paid more than ever, my manager was great, and the work was easy, but I was struggling with depression. I ended up quitting and crashing on a friend's couch for a while, and despite making that change to be able to pursue more meaningful work, my depression didn't abate. I ended up crashing and burning in a pretty significant way, and it was rough.
The point I wanted to make in sharing this story is that I wish I had taken the depression more seriously by itself and hadn't assumed that it was solely or maybe even largely caused by my job situation. Both from my experience with mental illness and from the scientific literature I've read, sometimes the big external issues are masks or plausible excuses for your body & mind to go into a depression because it makes sense that you have a big change outside, and so you get a big change inside. Sometimes those external changes do definitely cause big psychological struggles, but other times the depression kind of comes out because your psychological defenses feel comfortable enough that you will avoid addressing the root of the problem, and only address the external circumstances which you are able to reasonably enough blame your depression on. It's like a release valve in some way, but whose function is to avoid real psychological change at all costs, because the status quo is the safest place to be for our psyches.
I'm not a scientist and you might describe this as some kind of "just so" explanation or too much into psychoanalysis, and that's certainly a possibility. But with this stuff I've found that often times our psyches are very cagey and difficult to really understand in a straightforward way. If my explaining this pattern I've observed in my own history is beneficial to you or anyone else reading this, or at the very least interesting, that's good enough for me.