D40 is not junk and comparing it to a 40D is like comparing a Subaru STi to a Lambo--they're both dope cars, just at different levels.
One thing about the D40, and all Nikon DSLRs, is they have far superior kit lenses to Canon. When you're buying a "low-end" DSLR it's usually coming with a lens as a package and the Canon kit lenses are like toilet paper tubes compared to what Nikon puts out. That's not to say Canon doesn't make good glass, you just have to put out for it.
It seems the above comment is based more on Nikon vs. Canon bias, which is probably more ignorance than anything. While Canon is more prevalent in the ski industry, many notable photogs use Nikon. Blake Jorgenson, Flip McCririck, and Alex O'Brian come to mind. And right now the D700 and D3 are THE cameras to have for sports photography. The Canon 5D does take better shots, but really is only useful to the photographer doing landscapes.
The D40 is killer choice for the beginner photog. Ken Rockwell can use any camera he wants, and he constantly raves about the D40. You can get it with the 18-55 kit lens for about $400 these days. http://www.kenrockwell.com/nikon/d40.htm