I think that it's a matter of priorities. I am not interested in making the most money I possibly can, I'm interested in doing the most interesting work that I possibly can. I have even taken jobs where I was paid well below market rates because the work itself was interesting enough to me or taught me a skill that I really wanted to learn.
As long as I'm being paid at least an amount that I consider fair, it doesn't matter to me what anyone I'm working next to makes. If I disclose my salary and I'm making substantially more or less than my teammates, that can cause reactions in them that make the job much less tolerable regardless of my pay rate. So I don't want to know what they make, and I don't want them to know what I make. I have to work with these people, and want that to be as pleasant as possible.
Now, saying that is not saying that people who prioritize maximizing pay are wrong at all. They just have a different priority.