If you look at these characters in a vacuum, Robb's choices seem stupid. Gotta remember though, these characters have backgrounds and histories. Robb Stark had an uncle. Brandon Stark. He was Ned's older brother and heir to Winterfell before getting killed by the Mad King. Brandon Stark was supposed to marry Robb's mom, Catelyn. When Brandon Stark was off fighting, he got another woman (Ashara Dayne) pregnant, dishonoring her with a b*stard baseborn child. In this world, a high born woman losing her virginity pretty much makes her an outcast. No one will want to marry her afterward. Robb Stark didn't want to do that. So he married Talisa. Robb Stark also grew up with Jon Snow. He loves him and calls him his brother. Growing up together, he saw how bad Jon Snow got treated. He saw how much his mom hated Jon Snow. And he saw heard how Ned's one mistake in life was making a b*stard. So....the last thing Robb wanted to do was create a b*stard of his own. Thus, again, he decided to marry Talisa.
Sure, King Robb dissed the Freys. But plenty of marriage contracts get broken in Westeroes. Yet none of those people decided to murder the entire family in cold blood. Only Walder Frey did that. Because he's a vile, disgusting man.