Just an example: sales roles generally have commission-based compensation that scales with the amount of effort you put in and actually rewards high-performers.
In comparison, the "reward" for effort in a salaried SWE job is more work and to get your token 5% raise early if you're really lucky. And that's after you go through the insane recruitment & interviewing processes.
The SWE salary income might sound high at first glance when you're young and fresh but tops out quickly (and of course that top end has been significantly eroded by inflation), much lower than other roles.