Sure, money may not be the motivator within a population that we think, but I maintain it does affect the composition of the population. In my years as a STEM teacher, I often heard students making career plans, and for 35 years, potential earnings was a factor.
@garyackerman
As a chemical engineer, I'd estimate about 1/2 of ChEs choose that major over other STEM fields because of the reported high salaries.