It's not that useful now that we have computers, but in the early 1900s it was a reasonably good approximation of a market cap using fast math.
On which point, John K. Galbraith's The Great Crash: 1929 (1954) remains an excellent history of those events (and notes the DJIA's value frequently), as well as a general primer on equities and investments, and how they may go wrong.
1. sum 500 of the biggest companies by size (price * n shares).
or
2. have WSJ editors select 30 companies by any criteria they see fit, but you don't get to see the size of the companies, only the share price.
The way that the DJIA changes isn't the same as an index of, say, the n most highly capitalised equities might (Fortune 5, 10, 20, S&P 500, etc.).