Obviously, scientists are human. Egotism, embarrassment or greed might cause one person to try to hide something. However, history shows that the process of science is extremely good at detecting and correcting such problems. To outsiders, the scientific world might seem monolithic. But inside, there are factions and even feuds.
Funding is always in short supply, so groups compete.
They get to see their competitor's scientific proposals, and they have incentive to point out flaws in the other group's proposal. Similarly, groups spend money, and they have to show their sponsor that they received value. For example, radioactive dating is usually done by dating specialists, and the scientists who use those services are free to switch to someone else. So, dating labs compete. For example, a funding agency might send bits of one single rock to many dating labs, and then publish the results if they didn't all get the same answer.