There's a reason that so many people now get prompted by moving "horizontally" between companies, very few companies today properly reward loyalty, if anything most actively incentivize individualism and disloyalty.
There is always "we fired 20% of the people, now their workload is on your shoulders or you will also be fired".
There is always "here is a book titled 'use agile to deliver twice as fast' now the deadline is in 3 months instead of 6 or else".
The only defense against that is having more options.