According to this paper by the previous editor of Journal of Finance, Campbell R. Harvey, authors of papers should "convince the reader that there has been minimal data mining". Why is it so?
Assuming by "data mining" what they really mean is "continually testing hypotheses until you find something significant"...
or a comic depicting the same issue:
Basically, when we perform a hypothesis test (using a frequentist approach), we are asking whether it is likely that the data we observe (for example, a difference between two groups) occurred simply by chance.
However, if you look at multiple possible questions, it becomes increasingly likely that you find a result that, due to the flawed approach, appears unlikely to have occurred by chance. If you use a significance threshold of 0.05, you in fact expect that 1/20 times (in the large number limit) you look at completely random data you will conclude a significant difference.
You can still do this systematically and correct for this exploration without increasing your false positive rate. The problem is when you set these explorations aside and pretend that only the "interesting" ones (based on a flawed measure of statistical significance) occurred, you are likely to report a result that occurred by chance and is not replicable.
This problem is even worse if you use your results to inform further analyses in an unprincipled way. For example, you compare two groups: jelly bean eaters and non-eaters, and find no significant difference in cancer risk, but you look and see that the difference is smaller in a subgroup. You then exclude that subgroup (say, people over 55 years old), repeat your analysis, claim "statistical significance", and write a paper titled "Jellybeans cause cancer in people under age 55".
If you didn't set out to test this hypothesis because you had no a priori reason to expect age differences in jelly bean danger, it is very likely your conclusion is wrong: you have "mined" out a result from the data that didn't really exist in the first place.