When the Mass Airflow Sensor malfunctions or gets dirty, it'll not send the correct value measurement to the Engine Control Unit (ECU). This improper calculation by the MAF sensor will inject too much or very little fuel into the combustion cylinders. Obviously, this isn't safe, and your car will begin to decelerate and accelerate without you pressing the gas.