From what I can tell, you don't want a D40. Get something that'll actually be able to use Nikon's entire lens lineup.
The D40 is really a camera for someone that is new to the camera world or moving from a P&S to a DSLR, for folks that would probably use the kit lens almost exclusively. An alternative to the D40, in my opinion, would be a used D70s, which one can find in excellent condition for about the price of a D40... but I would recommend that only for someone that wants to control their camera via actual buttons and not some menu on a screen.
I see it similarly. The camera's just built and designed for people who want to use the kit lens, maybe a superzoom or kit-grade telephoto, and probably not much more. That's a pretty big segment of the market. For the sort of customer more interested in having a lens collection
that might include some older glass, some primes, etc. they have the d70/80/90 line with the in-body focus motor and dual control wheels. They've long positioned this line of bodies at a lower price point than, for example, canon's midrange, generally included better glass in the available kits, and made the bodies pretty feature rich yet still lightweight and compact (without the onerous ergonomic issues of cheaper canons).
Yes the d40/60 bodies are a bit bare in features. They're also cheap and do what a large chunk of consumers want/need. If they don't suit you, higher end bodies are not that much more expensive and readily available used.