Ok well technically front-running is a term used in the industry to specify a type of trading, it's not illegal in itself. However, you can front-run in an illegal way. Like driving a car isn't illegal but you can do it in an illegal manner. The act of front-running becomes illegal when you do it based on insider information, much like the driving becomes illegal when you speed.
I hope this clears things up.