Had Robb actually gone through with his promise to marry one of Walder Frey’s daughters as opposed to choosing his own non-Frey wife, things may have played out differently.
Alas, they didn’t, and while the world was traumatized when the moment aired, fans got a great scene from it when Arya exacted revenge.
Robb and Catelyn’s deaths (along with Robb’s army, of course) essentially destroyed the North’s effort for quite a while, which in turn gave the Lannisters an opportunity to finally breathe after attacks from all angles.