When you click on links to various merchants on this site and make a purchase, this can result in this site earning a commission. Affiliate programs and affiliations include, but are not limited to, the eBay Partner Network.
Here's the scoop.. The MAF measures how much air is passing by it. The engine computer uses this measurement directly do determine how much fuel to add.
If you have a loose or disconnected hose between the engine and the MAF, then "unmetered" air gets pulled into the engine, meaning these is more air entering the engine than the computer knows, and as a result it isn't adding enough fuel to maintain proper air/fuel ratio.
As a result you get a lean running condition, which can cause stalling, cutting out, lack of power, pinging, and codes being set.