Cooperation is a persistent behavioral pattern of entities pooling and sharing resources. Its ubiquity in nature poses a conundrum: whenever two entities cooperate, one must willingly relinquish something of value to the other. Why is this apparent altruism favored in evolution? Classical treatments assume a net fitness gain in a cooperative transaction which, through reciprocity or relatedness, finds its way back from recipient to donor. Our analysis makes no such assumption. It rests on the insight that evolutionary processes are typically multiplicative and noisy. Fluctuations have a net negative effect on the long-time growth rate of resources but no effect on the growth rate of their expectation value. This is an example of non-ergodicity. By reducing the amplitude of fluctuations, pooling and sharing increases the long-time growth rate for cooperating entities, meaning that cooperators outgrow similar non-cooperators. This constitutes a fundamental mechanism for the evolution of cooperation. Its minimal assumptions make it a candidate explanation of cooperation in settings too simple for other explanations, such as emergent function and specialization, to be plausible. One such example is the transition from single cells to early multicellular life.