Often, extruding is the only method that can be used. Machining many lengths of metal to particular cross section is almost always more costly than extruding a similar number of pieces.
Scrap resulting from machining often weighs more than the finished work.
Fabricating shapes by welding is also costly . Each work piece must be welded and costs do not decrease much with volume. In some instances the cost of the necessary welding jigs is much higher than the cost of the extrusion die that would be necessary to produce the same shape. The cost of roll forming dies is very high compared to extrusion dies. Additionally roll forming cannot be used where wall thickness must be varied.