I can see why a 600cc motorbike costs so much, have owned many bikes in my life & they are very high tech indeed but a 15 mph electric bike with a little electric motor & battery along with a few basic controls, I just don't get it.
The manufacturers should really be called assemblers because nearly all the components in their bikes are not manufactured by them.
That accounts for the higher input costs to them and ultimately, the higher cost to the products sold in the shop.
The assembly job that is so straightforward results in a very large number of models (consequently smaller runs), sizes and colours that only need small changes like handlebars, gearset, suspension to appeal to ever more sophisticated audiences, a bit like the wine market really.
Bikes sold in the shops have to be expensive enough to cover the cost of covering for warranty service, typically about 30% of the value of the bike.
After you remove the VAT, the dealers' margin, the transportation and packaging cost, the manufacturers don't make much profit on the sale but still a lot more than they make on a normal bike.
In my view, unless you want something special or you are on a very small budget, you can't beat a ready build.