The infamous "Z" tube connects the crankcase to the airbox to feed blow by gases into the cylinders to be burned. It has a negative pressure(vacuum) generated by the suction of the cylinder's intake stroke.
When the tube breaks down and begins to leak, it allows air that is not measured by the airflow sensor into the engine. Because it wasn't measured, this air has no fuel injected for it, creating a lean mixture that results in poor idle and mid-range performance, especially on acceleration.
One of the first things many of us do to a "new" bike is replace that tube, it's a known troublemaker.