The actual work (what is being done), the mission of the company (are you helping kids send pictures that disappear after 10 seconds or are you working on finding a cure to hearing loss?), the team, the location (do I have to spend 2h commuting?), the opportunities to learn, the opportunities to grow, etc. We each value different things, but if money is your only consideration, you will be treated as a "disposable mercenary" because that's exactly what you are. You will never be trusted, because your loyalty is directed at whoever shows more $$ to you.
Companies value more than just pure technical skills: loyalty, teamwork, communication skills, attitude, ethics, drive, independence, etc... If you only play in that one dimension, the game becomes very rough for both sides. I've never seen that work well, except for very short term assignments.