There is a lot of regulation. Almost every aspect of the design needs approval by the department of transport.
There is a need to ensure that the vehicles can be produced in mass production versus a one off. This includes quality control and specialised tooling for their production line. It might even include a new production line / facility.
Mass-production of anything cost-effectively at gigantic (100M+ units) scale is an engineering problem in and of itself, a whole other layer on top of the difficulty of designing the product in the first place. In some cases it's considerably harder.
My understanding was that the Model X is planned to be built on the same line as the Model S is currently being built on, they are currently building cars at a rate that works out to about 25,000/year, and they expect to be able to tweak the line to produce 100,000/year.
They will need some new tooling for the new Model X parts.
There is a need to ensure that the vehicles can be produced in mass production versus a one off. This includes quality control and specialised tooling for their production line. It might even include a new production line / facility.
I don't think it's middlemen increasing the cost.