A lot of factors:
1) People definitely did get away with this, all the time. Historically, researchers had no obligation (at least that was practically enforced) to maintain and share their data and code. Peer review would check for specific methodological flaws and nothing deeper. If someone emailed you about your 1995 study in 2005, you'd say "I no longer have the code," or, more likely, simply never email them back.
2) In a highly competitive landscape where cheating is effective, the "winners" will be heavily selected for willingness to maximize the use of cheating. Even if only 1% of the population is willing to commit explicit fraud, that 1% is going to be heavily overrepresented in a world where explicit fraud gets you the top-tier publications that bring you to prominence.
3) Ariely and Gino both made millions of dollars from their fraud that they will not have to give back. It's worth emphasizing how poorly Ariely's fraud was executed -- he did the laziest possible fraud and easily converted it into money and prestige.
4) Related to the first point, it's hard to overstate how much the culture has shifted since the '08-'12 time period. The replication crisis was just kicking into gear, and only among people who were paying attention to that type of thing. Ariely didn't come up reading Andrew Gelman's blog. There's simply far more light on any paper today than there would've been 10 years ago -- statistical and methodological understanding have come a long way as cohorts of academics came up in the shadow of the replication crisis. Having established credible groups like Data Colada to centralize these analyses has also been a big deal; tenured profs can't bully Data Colada by threatening their career progression the same way they could if accused via email by a random grad student.