Front running is illegal. However, making a better price prediction than the rest of the market and trading on it is not the same thing as front running.
Generally, illegal trading resolves around the idea of trading on non-public information. And front running falls under that category (access to order data that other participants do not).
However, HFT's do not trade on non-public information. Every participant has access to the same market data. I could start my own "HFT firm" tomorrow; I would just be incredibly unsuccessful at it because I don't have the finances or computing resources to execute.
This is a pretty widely discussed question, and while I think the empirical evidence is so far unclear, there are some obvious theoretical models where costs for large institutional investors (like pension funds) go up. E.g. https://papers.ssrn.com/sol3/papers.cfm?abstract_id=2238516.