Let me try a broad answer: Empirical research does not work without data. Either you collect data yourself, or somebody else does. The more people replicate your study, the more credible your research results become. Replicating studies is hard, but without access to the original research data, it is often close to impossible. So everybody benefits from data sharing.
Of course, replication attempts can also reveal weaknesses in the original study. The (in)famous Rogoff & Reinhart case is summarized in the introduction to the Conquaire project proposal: Due to one faulty spreadsheet, entire national economies were at risk until Thomas Herndon, a student, got hold of it and checked the math. (I am counting code and other analysis procedures as a kind of research data.)
I think this case is atypical in the extent it damaged the reputation of the original authors. Any replication attempt will generate citations of the original study, so their authors' reputation will go up. Looking beyond pure replication, any kind of data re-use will produce acknowledgments. But you never doubted that data sharing is good for the sharers, so I stop here.