Penalties exist, but are either not enacted, or some poor "rogue trader" is wheeled out and does a couple of years. Trading in stock markets is legal, but HFT in front of your own customers is not. No-one else is allowed to place millions of trades "price finding" and cancel them at the last femto-second (or whatever rapidity they are now operating to). It's theft, plus distorts the market (which exists expressly for the purpose of clarity and price finding, not for distortion).
If it is not an open market with equity of information for all, then the gain one person is making as a result of that is the direct loss of someone else. There is no "gain" to society in that, it just shuffles money toward banks, and more importantly keeps the minds and efforts of the banking industry focussed on that. The purpose of the rules of markets is to "direct greed", for want of a better term, such that the pursuit of profit results in benefits for society as a whole. The banking system is a huge fail against that, and has been for at last a couple of decades and getting worse. We can do much better than that.