The ergodicity problem queries the equality or inequality of time averages and expectation values. I will trace its curious history, beginning with the origins of formal probability theory in the context of gambling and economic problems in the 17th century. This is long before ergodicity was a word or a known concept, which led to an implicit assumption of ergodicity in the foundations of economic theory. 200 years later, when randomness entered physics, the ergodicity question was made explicit. Over the past decade my collaborators and I have asked what happens to foundational problems in economic theory if we export what is known about the ergodicity problem in physics and mathematics back to economics. Many problems can be resolved. Following an overview of our theoretical and conceptual progress, I will report on a recent experiment that strongly supports our view that human economic behavior is better described as optimizing time-average growth rates of wealth than as optimizing expectation values of wealth or utility of wealth.