I do not claim to be an expert on the subject but there are many reasons to use one or the other. Here are a few reasons that I am aware of:
1) Cost due to availability. 40" seamless pipe would cost a fortune and would probably have a ridiculous lead time for delivery because very few manufacturers have the equipment to produce it. ERW would be much more affordable. Don't quote me on it, but I'm guessing that 1" seamless pipe is probably cheaper than ERW. I'm guessing that a combination of market demand and production methods makes seamless a better option for these small sizes.
2) Cost due to quantity of material. ERW has a longitudinal weld joint quality factor of 0.85 which may require an increase in schedule of pipe for the same pressure/temperature rating.
3) Manufacturing Tolerances. ERW pipe typically has a manufacturing tolerance of 0.01" while seamless has a tolerance of 12.5%. This will affect the wall thickness calculations. It is also easier for the manufacturer to make the wall thickness on ERW pipe closer to the -0.01" tolerance than the -12.5% on seamless. This allows the manufacturer to use less material, reducing costs. (The ERW is made from strip material which is easier to control thicknesses on than the seamless pipe.)
4) Welding concerns in sour service. Even though NACE MR0175 allows the use of ERW, many owners will only allow seamless pipe up to sizes where the cost of seamless becomes prohibitive.
Basically it comes down to cost vs. quality. (Although manufacturers of ERW pipe will insist that ERW is as good as seamless.) In general, seamless is a Cadillac solution.
I have only addressed ERW piping here, but the same will hold true for most types of welded pipe. Unless it is specifically prohibited, welded pipe can be used almost anywhere seamless pipe can PROVIDED that the piping is designed properly.
Once again, these are just my thoughts based on limited experience...