What is the purpose of the pipe is it to restrict the engine to keep a constant run or to keep the 4 2 break more consistent
It's to tame the otherwise excessive power at high RPM, and create a regulator for the engine speed. 4-2 or not is just another factor that goes into it, but even when it stays in a 4 or stays in a 2, the RPM can change a lot - far too much in some cases - without having to switch modes.
The pipe is tuned at an RPM lower than the in-flight RPM, so if the airplane slows down (like, during a corner), this drags the RPM down, which puts it closer to the tuning peak, which tends to restrict it slowing down any more.
Note that the engine might not have any more power, possibly even less, at the normal running RPM than it would without the pipe.
Brett