In areas where going from one company to another as a "senior" only ends up with like a 5k gross pay difference, it's almost negligible.
In Silicon Valley hopping companies can be like $100k/year or more gross pay difference. In a few years you might leverage that when switching companies again to get even more. Adds up fast.