Plus that wasn't the (only) goal of the missions: beating the USSR there was a stronger motivator.
Let me ask you this: Given the scientific advances made due to the first moon landing, do you think that the second, third, fourth, fifth and sixth moon landings also added tremendous scientific value? Do you think there should have been a seventh?
No, because we clearly weren't willing to commit the resources to make our efforts pay off in the long run. Who knows what might be possible now, if we had used the money we spent on the Viet Nam war to successfully establish a permanent manned lunar colony?
After that, maybe not so much. But the program was designed with ~nine landings in mind, and that's what we should have done.
I think the depth and breadth of human knowledge would now be greater if the moon missions were unmanned and the money was instead spent on other areas of scientific research which were judged to be cost-effective.
Perhaps the following experiment would be a way to resolve our differences: Let's survey a random sample of 100 scientists asking whether they agree with the above statement. But not just scientists involved in space exploration - all types of geologists, climatologists, astrophysicists, neuroscientists, anthropologists, palaeontologists, etc. If less than say 25 scientists agree then I would accept that I was wrong about the wastefulness of manned moon missions. If more than 75 scientists agree would you accept that I was right?
Sending a robotic probe to collect moon rocks would have been worthwhile. But sending humans to do the same job was far more costly and provided very little additional scientific value.