I'm not sure where that generalization comes from. My best jobs were/are the best paying ones. Among my programmer friends, the "well paid but soul crushing job" wasn't really ever the case either.
Shitty jobs, on the other hand, tend to be one where you are underpaid.
If you take only one thing from this thread, it should be the above quote. If you need a highly intelligent, hardworking person to do something tedious and dull, how can you convince them to do it? You pay them buckets of money. Examples: programmers in finance, big law firm associates.