I think someone mentioned it before (sorry, not going to reread just to quote), but Robb is more naive than anything. He originally called his banners when his father was taken captive, which is a perfectly understandable response. Also keep in mind that the Lannisters were already mobilized and raiding the Riverlands as a result of Catelyn acting rashly and taking Tyrion captive. With the Lannisters raiding their lands as well as the obvious family connection, Riverrun chose to side with Robb, which is why he could not just simply retreat and fortify the North, as it would leave his grandfather and uncles to fend for themselves against a much more powerful army.
That is part of the beauty of ASoIaF. It plays out like real life, with numerous reasons that the war is started. As many have mentioned before, there are no true good or bad guys. You may look at Ned and his family as such, but more than anything, they are honorable to a fault, which does not necessarily make them good, just more respectable. After reading both series, I like to think of Ned as like Galad in Wheel of Time: it's never about what is best, it's about what is honorable. Some may think that to be "good", but with both characters, we see that it can be detrimental, not only to themselves, but to many others around them. Sometimes, we must make difficult decisions because we know that it is what is best, whether for our families or even on a larger scale, and Robb, as with his father, failed to see the true impact that such decisions would bring.