Because jobs are nowhere near a perfect market.
* The switching cost for jobs is very high. You lose the social network of people you know at the old job, all of the knowledge and skill that's specific to that company goes out the window, you may have to uproot and move.
* Jobs are not transparent. It is fantastically hard to tell if a new job is going to be better than your current job. You know the base numbers like pay, but you have little way to accurately evaluate the culture, office politics, other people, management, company direction, etc.
* In many areas, there are few jobs to choose between. Amazon fulfillment centers are a good example because they hire many people in a areas with few other jobs to choose from. (This is also, I think, a big reason for the demographic changes towards cities in the US today: they give employees access to a more diverse job market.)
* Jobs are not homogeneous and interchangeable. One job might have better hours or a shorter commute but worse coworkers. One may pay more but have worse health insurance. There is so much variance that it's impossible to define an "optimal" job or even precisely compare two jobs.