First, while you can piece a bike together that costrs more than a Duck 749, it is far from the norm. If you want to compare that way, then you need to compare motorcycles built with high end parts--aka race parts--to bikes built with high end parts. In that light, the high end bike is much cheaper. Race motorcycles get very expensive quickly: magnesium wheels; titanium exhausts; EPROM chips; engine mods; light weight/top end brakes. In 1997 I put $12,000 into a motorcycle I raced. That far outpaced any bike that could have been bought back then.
In reality most bikes sold aren't anywhere near Ducati 749 territory. Most bikes sold are in the $500-$1500 or so range. Also, motorcycles can be priced lower given the volume with which they are made and the fashion in which they're made: on an assembly line. High end bike parts aren't assembly line products. By high end parts, I mean AX Lightness brakes, AX Lightness seatposts, THM Cranks, LEW wheels, Lightweight wheels, ADA wheels, Zipp aero bars, or even Oval aero bars. All are done by hand, in labor intensive processes. This drives price up significantly. The places that make these pieces have to support themselves, so given the relatively small market for these pieces and the relatively high demand for these pieces in that small market, economics says the price will go up. It's also important to remember that the skill set needed to make these parts isn't small, either. It carries value that adds to the cost of the part. It's also not uncommon for a small manufacturer to raise prices to prevent a giant waitlist from forming. This is a tack that LEW Racing has taken with their $5000+ VT-1 Pro wheels. They've said that the price is high, in part, so that they will blunt some demand until their production process is optimized so that they can manage a larger demand.
I hardly think that bike makers/parts makers are just charging what they can. None of them are getting rich, and I'd wager that a lot of whatever profit they are making is funneled back into R&D and capital improvements. If nothing else, I'm sure that it takes quite a while to earn back the monies to cover just the startup costs/initial investments. An example at the extreme end would be in the defense industry: right now, it takes Lockheed Martin approximately 15-20 years of aircraft production to earn back the money spend developing said aircraft. While not necessarily comparable to bikes per se, it does show that initial investment costs can be comparitively huge for a company.
THM has a 30+ week wait time for their $1200 cranks, so how many do you think they're making a year? AX Lightness brakes can definitely be hard to find. And LEW is now producing a total of 2 wheels a day.