Enjoying one's work is key to employee retention. While salary/benefits provides a very practical reason to leave or stay, from what I've seen in the workplace, factors such as interpersonal relationships, company culture, and engaging work carry a lot of weight. For most people, salaries are direct deposited every other week, but the amount of satisfaction they feel at their job is on a day-to-day scale. Do they enjoy working with their coworkers and managers? Is the company demanding or understanding? Are the employees doing important work, menial tasks, or are they just sitting at computers trying to look busy while having nothing to do? I've seen that as long as the salary is in the livable range for the indivdual and their lifestyle, people would rather make less money and stay at a more engaging, friendly workplace than leave for higher pay but a more toxic or stressful work environment. While money means you can live, your mental state at your job is what is ultimately going to decide if you leave or stay.
Job satisfaction is clearly important for retention and productivity, but I don't think it's the most important factor in isolation rather, it's the outcome of multiple interacting factors working together, including compensation, autonomy, relationships, growth opportunities, and work-life balance. Trying to rank them hierarchically oversimplifies how motivation actually works, because people have different priorities at different life stages and in different contexts. Compensation matters more than idealists want to admit. While money alone doesn't create satisfaction, inadequate compensation is a powerful demotivator and retention killer. If someone is underpaid relative to market rates or struggling financially, no amount of "meaningful work" or "great culture" compensates for that stress. In the medical device industry, talented engineers and scientists know their market value, and if you're paying 20% below competitors while demanding 60-hour weeks, people will leave regardless of how interesting the projects are. That said, once compensation reaches a "fair enough" threshold where people aren't stressed about bills, additional money has diminishing returns on satisfaction and retention. The engineer making $120K isn't necessarily happier than the one making $100K if everything else about their jobs differs dramatically.