Why is that a developer's problem? If anything, they are incentivized to avoid creating future competition in the job market.
Seriously, long term thinking went out the window long time ago, didn't it?
It is definitely a problem for the company. How is it a problem for the senior dev at any point?
What incentive do they have to aid the company at the expense of their own *long term* career prospects?