Epistasis between mutations can make adaptation contingent on evolutionary history. Yet despite widespread "microscopic" epistasis between the mutations involved, microbial evolution experiments show consistent patterns of fitness increases during laboratory adaptation. Recent work has found that this consistency is driven in part by global patterns of diminishing-returns and increasing-costs epistasis, which make mutations systematically less beneficial (or more deleterious) on more-fit genetic backgrounds. This global "macroscopic" epistasis is thought to make phenotypic evolution repeatable, even while the genetic basis of this evolution is highly stochastic. However, the mechanistic basis of consistent macroscopic epistasis remains unknown. Here we show, using a generic model of a complex trait, that global diminishing-returns and increasing-costs epistasis arise naturally as a consequence of pervasive microscopic epistasis, emerging simply as a statistical trend due to an imbalance between positive and negative contributions to the fitness. Our model predicts a specific quantitative relationship between the magnitude of global epistasis and the stochastic effects of microscopic epistasis, which we confirm by re-analyzing existing data. We also describe the predictions of this model for the patterns of fitness evolution and for how the distribution of fitness e↵ects shifts as a population adapts, and propose additional experimental tests of these results. ⇤