There's a bikesdirect thread you should read, but the main answer to your question is that it isn't just brand. One of the biggest differences is service - when you buy a bike shop bike like Trek it is fully assembled for you - often including swapping stems or whatever for fit - and it comes with a tune up of some sort. Additionally, little things that can be a problem like cable housing will be better on a brand name bike.
There are some real bargains to be had buying a bike mail order. But if the savings is $300 on paper, it is probably closer to only $150 after making up for the support you don't get, and may be even less of a savings after a year or two. That isn't a vote for or against - just making you aware that there are going to be additional costs - especially if you aren't already a skilled mechanic.