High compensation can also bring more freedom and happiness, since it’s more costly for your employer to replace you. It’s cheaper to keep an existing employee happy than to spend a lot of time and money to bring a new person on board. If your compensation is lower, it’s not as big of a factor.
I wouldn’t take a job if it clearly doesn’t fit me at all, but within the band of “acceptable jobs” aiming for highest compensation is the way to go in my opinion.