Everything else being equal, a carbon mast is both stiffer and lighter, so the obvious choice for racing or if you want the best and/or a light foil.
But as alloy when using a bit thicker/wider profile, can be sufficently stiff or even stiffer yes, and quite tough too, it makes good sense to use for freeride so the cost is lowered significantly.
The corrosion issues is something one has to handle besides added drag and weight but it does not mean much for many riders, for others (also freeriders) it means a lot.
Just like a bicycle - some, in fact most, use heavier cheaper alu or steel bikes, others use carbon, and some use a mix.
Both personal preference and what you use it for, and the thickness of your wallet maybe
PF