Having a relatively straight and smooth flow before the sensor allows the air flow to kinda smoothen out and be less turbulant.
The sensor is only touching the air flow in one little point in the middle of the air stream. It expects that the air flow through the pipe to be relatively uniform, so the measurement it makes in the centre of the pipe can be extrapolated out across the entire cross section to give you an accurate represenstation of air mass. If the flow is turbulant, or maybe more flow through one side of the pupe than tgeotheror whatever the case may be, then the measurement made by the sensor may not be accurate.
When i was still using the crappy
MAF, i used a
MAF housing similar to this. See it has the honey comb straightener fins about 4-6" before the sensor. These are there to try and straighten the air flow and get a uniform flowover the sensor. Its more important if you fit and then scale to larger than OEM diameter pipe aswell. As when you go bigger, you can measure more air before you hit 5v, but the trade off is you lose fine resolution of the sensor. (Important for smooth running/idle/cruise)