Why are electric bikes so expensive?
I have sold a small quantity of electric bicycles over the years (including one to a 83 year old woman). Were these profitable sales, from the bike-shop's point of view? Not really...   

Frame + Extras

Cost is different to price, clearly the bicycle costs more to build, e.g. in Giant's top-class Taiwan factory on a relatively limited production run. As mentioned in other answers, there is the motor, the batteries and control gear. On top of that there is also a more expensive frame. The frame has more 'braze-ons' to mount the electric running gear. It is also extra tough so that the frame and fork can survive (force = mass x acceleration and an electric bike goes quicker with extra mass). This frame/fork combination is also unique to the electric models whereas, on a normal bike, the frame may be shared across a model range.
As well as the frame/fork being different, the wheels and tyres are up-rated, this may not actually cost that much more rubber and aluminium, however, these parts are model specific, limited run for the manufacturer, possibly specially made by the suppliers.
As of yet there are no electric bikes that make use of the frame to carry the battery, typically this has to have a rack and extra packaging to attach it to the bicycle. These parts cost money, again they are also bespoke.
The batteries can use Lithium, NiMh or even lead-acid, clearly with cost differentiation, the Lithium cells costing more.  

As of yet we have not left the factory with our electric bicycle, the extra parts and Far Eastern labour may not actually amount to a lot in absolute terms, however the factory-cost will be a significant multiple of the regular mass-market mountain/hybrid bicycle cost. The parts cost more as does the assembly line. 

Shipping: Weight and size

When we come to ship the electric bicycle half-way around the world, there is approximately twice the cost, whether the shipping is priced by weight or volume. This is because the electric bicycle weighs more and needs a much bigger box (compared to a typical MTB that ships with the bars/front-wheel/seat/pedals removed and no mudguards). Interestingly there is less EU 'anti-dumping' duty on electric bikes than normal ones, so no added cost there (and if you wondered why some bikes come from Macau you now know...). Some money does have to be paid to get the boxes out of Felixstowe, on the back of the lorry and up to the warehouse, again this is slightly more than the regular MTB or hybrid, but not massively so.  

Warehousing margins

Now, this is where the costs get interesting. The bike arrives at the wholesaler or distributor and gets put into a warehouse until a retailer orders it. The wholesaler has price tiers for their 'B2B' customers (the shops) and these will be different depending on sales volumes, e.g. the big chain will get an extra 10-20% off the 'trade price' compared to the family-run lower volume shop. Because the product has a list price then this discount is unlikely to be passed on to the end customer, however, it does give the volume retailer that bit more room come end-of-season sales.  

Notionally the wholesaler/importer/distributor is just importing boxes, putting them in a warehouse and sending them out again. In an ideal world they would charge just a flat fee for this, however, the more expensive boxes tie up more capital, they also tend to linger in the warehouse longer. This means they cannot be marked up by the wholesaler with a 'per box' price. Typically a standard margin is applied to the products, exactly what this margin is may seem high to someone outside of the trade, however, the tax man has a slice of that and some of that margin may be swallowed up by currency fluctuations.  

Expensive, Niche Product

When the retailer buys the electric from the company owning the big warehouse they may be buying just the one - most bicycle shops cannot afford the showroom space or the capital cost to have a range of electric bicycles. For this reason it is unlikely that a good deal is done due to bulk purchasing. The delivery to the bike shop may be relatively expensive too - delivery with all couriers in the UK is by weight. So we have double the cost on this leg of the journey when compared to the regular bike.  

The retailer has what seems a good bit of money to make on the electric bicycle. However, walk-in customers have not arrived for an electric bike, they are there for normal bikes. They may not even be aware that electric bikes are on offer too. Walk-ins just don't ask for an electric bike - customers wanting touring bikes or tandems are rare, customers wanting electric bikes are rarer too for the regular bicycle shop. To change this situation requires promotion, i.e. advertising, a window display and sales staff training. With the exception of retailers that have gone out of their way to push electric bike sales, this does not happen.  

Training / Support

As well as the sales staff having to be able to know how to sell an electric bike the mechanics in the back room have to know how to make them showroom ready. Then, should a sale come along, the bike has to be checked to make it safe. Additionally, the bike will collect quite a bit of dust waiting for a customer and be subjected to test rides by potential customers. This total time will be a lot more than with the regular bike because the electric bike is not so familiar to the workshop team. It is unlikely that this time is costed, however, it all adds up. Hence the eventual sale is unlikely to be discounted (unless the shop is small and desperate for some extra cashflow that week or the model is end of season and needs to be shifted). The taxman also takes his cut, 20% VAT is not a lot of money if buying a 'Bicycle Shaped Object' (cheap bike), but is a lot of money if buying an electric bicycle.  

Margin Pricing

If we work through the above steps starting with one small component, e.g. a washer that costs a penny. Its cost could be ten pence by the time it has been fitted onto the bike, maybe up to twenty pence to get to the warehouse in Milton Keynes. Because of how margin costing works, the washer could then cost forty pence by the time it gets to the showroom. On the face of it, it seems ludicrous that a penny washer now costs forty times as much, however, along the way nobody has been greedy (maybe with the exception of the taxman, but that is government protection rackets for you - lots of wars to pay for).  

Although the maths has been simplified with the 'washer' example, costs go up from component supplier to the cycle manufacturer to the distributor and to the dealer with the maths being multiplication (by a margin) rather than addition (of a handling fee) at most steps. That is how it works.  

Clearly, to save costs a cheaper washer could be used - one that costs the factory 0.5 pence - and it could be fitted to the bike by someone in mainland China costing less than the Taiwanese worker. The factory too could be cheaper - with less capital tied up in the building/land. This 'cheaper and nastier' product could then enter the supply chain to be marked up with margins at the importer-distributor-wholesaler-retailer steps. Given that the product is not really one that anyone really wants, some incentives exist in the supply chain, e.g. higher margin for the retailer. Hence the 'cheap' electric bike - as sold by certain High Street chains - might be a complete rip-off with the worst components and the fattest of profits for someone in the chain.    

You might suspect that parts and training would factor into the costs, but it does not do so directly. Sales and workshop staff in the bike shop are unlikely to have had any training on how to look after customers for electric bikes. The spare parts are not likely to be kept in the cycle shop - these will be special order from the wholesaler. The wholesaler will be able to sell these spares profitably and - if they know what they are doing - keep sufficient spare parts stocked appropriate for demand.  

The price is Actually Reasonable

We are a long way off monopoly pricing with electric (and normal) bicycles, due to competition in the marketplace the pricing is nearer 'cost + acceptable profit' rather than 'what the market will tolerate'. Electric bikes are not expensive per se. With the exception of walking (and maybe container freight) there is no cheaper transportation going. Arguably normal pedal cycling is more expensive than electric bike cycling, however, this depends on how you value your time. Electricity to charge and electric bike costs less than a Mars Bar (or other calorific food equivalent).  

In the showroom electric bikes are somewhat clunky feeling, but once you go on the road with them and put the motor on the bike feels as light as a feather, particularly up hills.  

My advice for getting an electric bike cheaply is to do so through government 'bike to work' scheme. This is where your employer buys the bike and gets the tax back. Effectively you get the bike at 50% retail price, with actual ownership of the bike being between you and your employer. Typically they let you have it.