HFT firms make money by having sufficiently more accurate predictions of the future price than those they trade against -- here, for prediction, you can take any reasonable metric, such as the change in price in the next 10 seconds. Note that this can be done by simply being faster, as having the same prediction in 400ns that took everyone else 2000ns to discover is still having better predictions.
HFT firms typically have anywhere from little to very, very little trading risk, so long as the above conditions hold. Their actual risks are operational (How Knight blew up) or the above situation no longer holding (How Getco, Teza, etc. died).
Also, one thing I have to mention in your post -- stock exchanges were not the market makers of the past. That role was played by someone called a specialist; you can think of them as doing exactly what an HFT market maker does these days, except far, far dumber and far, far slower. Those people were typically (always?) not employed by the exchange. An exchange is simply a centralized place to display orders, not a counterparty that you trade against.