They must have access to cheap Chinese or Malaysian production lines, the same lines that assemble fake electronics like Iphones and stuff. They can make anything you want, you just have to provide the schematics and the cost is very low, so i'd say a lot of the price goes for the designer of the new chip and a PCB it's put on.
Well gee, Bitmain IS a Chinese company....
I suspect the largest part of the cost of the first few batches of the S9 was the design and implimentation cost of the chip, since then I'm quite sure that the costs have dropped quite a bit (more so than the sales price) and Bitmain has been raking in lots of money to put towards their own mining farm *AND* eventual design of a "next generation chip".