OK...let's not go running off a cliff with things I did NOT say. I did not say mufflers can't be improved -- they can. The cat converter is what kills stock bike mufflers. Some bikes have cats in the headers -- new cans don't help! You have to replace the header.
Why does AMA require stock airbox in a particular class? Probably because cone filters and straight intakes are too friggin loud.
A brief primer on air box and exhaust design -- and why race bikes do custom mods. Hint: They are looking for max torque at a particular RPM...usually a high one. The stock bike is tuned to produce a fine riding experience across the rev range -- and usually to get higher torque/HP at lower revs. That makes people like the bike more.
Air doesn't "flow" through an air box and into the motor. This is where people get it wrong and think that bigger openings are always better. An airbox is not a garden hose. The air goes into the motor in discreet pulses. Valves are opening and slamming shut, creating pressure waves back through the air system. Those waves come bouncing back at the valves. In a perfect world, the returning pressure front hits the valve while it's open, helping air push rapidly into the chamber. A perfectly tuned airbox resonates at the exact frequency where the motor designer/crew chief wants a little boost to the torque. It is a choice. An airbox bigger or smaller than needed, or with holes drilled in it that muck up the frequency, is suboptimal. Bigger is not better. The correct airbox is better, and it might be smaller. It might need holes; it might need a longer snorkel. Who knows if it's not on a dyno?
Similarly with exhaust. Exhaust doesn't flow -- it pulses. If "freer flowing" were best, try running your motor on a dyno with no header at all -- just open ports out the front. Your power would plummet. The outgoing exhaust pulse sends a sound wave down the header and to the muffler. At some point, it bounces back toward the port. In a perfect world, it arrives while the valve is shut, and bounces away just as the valve opens, leaving a low-pressure void in its wake. Exhaust comes screaming out of the port into that void and "rides the wave" out the back. But, as with air flow, it's only perfect at a single RPM. Just "opening up" the exhaust system might help; might not. It has to be tuned to exactly what the engineer/crew chief want. What they want (torque peaking at the highest RPMs) might not be what a normal rider wants. So, they use different stuff. Doesn't mean it is good on a street or trail bike that spends its days <4000 rpm.
All of this is why you chronically read about people being bummed out when they put their bike with the expensive new exhaust on a dyno and find no improvement, especially when the cat is in the header. Only after they re-tune it and do all sorts of stuff do they then love the new exhaust. But it's all that other stuff that is really improving the bike in many cases.