You're using the word "spread" idiosyncratically.
"The" spread is the difference between the best bid and the best ask. A market order "crosses" the spread, requiring the buyer to pay the best ask price or the seller to take the best bid price.
The function of a market maker is to bridge the prices of buy-side investors.†
Without market makers, spreads are much wider, because they depend on which particular long-term investors might be willing to trade today and what their limit prices are.
Market makers are willing to buy or sell in the middle of the spread --- presumably not all the way down at the best investor bid, and presumably not all the way up at the best investor ask. By briefly jumping into the middle of the spread, in effect finding compromise prices, market makers collect what's effectively a small fee in exchange for improving the "resolution" of the market's current price --- from, say, "XYZ costs 10.00 plus/minus a dollar" to "XYZ costs 10.00 plus/minus 2 cents".
In the 1990s, market makers were humans, and they were only required to quote prices to the nearest 1/8th of dollar. The price delta between the true market price for an instrument and the nearest 1/8th was a rent captured by the market makers. In practice, the situation wasn't even that good: market makers colluded to avoid quoting "odd eights", in effect offering only "to the nearest quarter dollar" resolution.
Electronic market makers (a/k/a HFTs), though not operating out of the good of their hearts (nobody in the market does) impose serious, fierce competition on market makers for different instruments. Instead of charging 0.12-0.25 cents for the service of discovering the clearing price of an instrument, they charge pennies. The 10-20 cents the HFTs shave off the spread is money into the pocket of anyone who trades, which very much includes "some dude wishing to invest his money".
In fact: if you read the responses to Lewis' book, the one consistent thing you'll see is the notion that if HFT harms anyone, it is not the retail investor. Even the people making the case that HFT is evil are making that case indirectly, by suggesting that HFTs impose costs on large sophisticated investors that act on behalf of ordinary people. (But then, Vanguard disagrees with that, too).
† The "buy" and "sell" in "buy-side" and "sell-side" refers to the intent to transact in liquidity , not the actual shares; the buy-side isn't "people who want to buy shares", but rather "people who want to trade now", or perhaps more accurately, "people who want to maintain long-term positions". The buy-side is "customers of the public markets" and the sell-side is "people who make the public markets work".