What’s Warren Buffett doing with a $10 billion bet on the future of oil and gas, helping old-school Occidental Petroleum buy Anadarko, a U.S. shale leader? For pundits promoting the all-green future, this looks like betting on horse farms circa 1919.

Meanwhile, broad market sentiment is decidedly bearish on hydrocarbons. The oil and gas share of the S&P 500 is at a 40-year low, and the first quarter of 2019 saw the Nasdaq Clean Edge Green Energy Index and “clean tech” exchange-traded funds outperform the S&P.

A...