One of the biggest surprises of the U.S. stock market’s relentless rally is how many individual investors have run away from it.

The Dow Jones Industrial Average closed above 25000 for the first time on Thursday, punctuating a record-setting period nearly unmatched in U.S. history. Yet throughout the nearly nine-year surge in share prices, individual investors have continued to yank money out of funds that own U.S. stocks.

Nearly...