"Every guitar is our BEST effort" -CFM."
The effort Chris is referring to is the actual construction of the guitar. Like any commodity, a guitar's production cost is determined by more than the amount is costs to put it together.
Your comparison of a D-1 and a D-28CW is an excellent illustration.
Back and side woods-Solid Indian or Brazilian (CWB) Rosewood is a lot more expensive than laminated(or solid back) Mahogany.
Fingerboards and bridges-Solid Black Ebony costs a lot more than In dian Rosewood.
Top Woods- High Grade Adirondack Spruce costs a lot more than Lower Grade Sitka Spruce.
Finishes- It takes a lot more time and labor to do a Nitrocellulose High Gloss Lacquer finish than a Catalyzed Lacquer Satin finish.
Have you noticed that I haven't said anything about inlays yet?
Why does the CW sound better? Tone is pretty subjective. Different woods produce different tones. A lot of people prefer the tone of Rosewood over Mahogany. I happen to like them both but traditionally, Martin's Mahogany guitars were of simpler designs so their prices were lower.
The higher-end guitars do get higher grades of these woods also and, of course, straight grained, consistently colored,"prettier" woods cost more. Generally, stiffer top woods produce better tone and tighter grained Spruce tops tend to be stiffer.
Martin says they grade their tops by appearance only but basically, better looking tops sound better (there is, however, certainly no consensus on this point). They have basically 4 grade "ranges" (my term, not Martin's) within each species of Spruce. They are 1/2, 3/4/, 5/6, and 7/8. The 7/8's are reserved for Vintage Series, Limited Editions, Signature Editions, and 40 Series guitars. It is possible to get a higher grade top in a "lower" series guitar by special ordering it (at additional cost) or, ocassionally there may be a temporary shortage of a given grade for a certain model so that guitar could receive a higher grade top than that specified for that model but it would never receive a lower than specified grade.
Most of this information comes from the very knowledgeable "sad souls" that post on the UMGF but my personal experience has proven to be pretty consistent with what I've read there.
I'm saving for a D-18VS.