With that said, if an engineer is bringing value and the company is not satisfying the needs of the engineer in some way, then the engineer should leave and find another position in which they will be satisfied while bringing significant value to the new company.
If a company can remove an engineer at the drop of a hat, why should an engineer not be able to do the same with a company? We put far too much emotion into these sorts of decisions. When it comes down to it the average engineer has about 90,000 effective working hours to sell in his or her lifetime. It is best to get the most out of those hours possible, whether that be purely financial (trading the most dollars for those hours as possible) or some other metric (the most satisfaction per hour traded). Quitting a job whenever your value per hour is too low for a higher value per hour is ABSOLUTELY the thing you should do.
Never sit at a job longer than you are satisfied. It is up to the company to keep you satisfied just as much as it is up to you to keep the company satisfied.
The one caveat in that is that for an employee value may come in multiple forms. Certainly pay is one of those forms. Some might seek upward job mobility or skills training increases. Over all satisfaction may be the highest value for some employees. In the US, medical benefits might be one. Maybe vacation pay. Value is a funny thing.
The parent of my first comment implied that companies do not need to solve the problem of people wanting to leave and being unsatisfied. It is absolutely the companies problem to solve. Some companies actually solve the problem quite well.