It is just an academic theory, not holy gospel (with a long "Validity and criticisms" section in Wikipedia).
I think salary IS a motivational factor in real life, as for many humans it is a yardstick of superiority compared to other humans (whether it is right or wrong is another matter).