I think based on what the show has shown, Robb's reasoning for wanting to repair the alliance with the Freys is ridiculous.
Tywinn has already shown a willingness to give up his own men in order to win a war, so what would Casterly Rock get Robb? When the Starks were at the Twins before, they described it as about 5,000 men, all of whom were important only because of where their castle was positioned. If Olenna's numbers are correct, the Tyrells are more than double what the Freys could supply. It's a plan that fails even if it works. ASOSOf course it doesn't, but I'm sure it sounds better on paper
It is more strategic than anything. Losing your home makes you seem weak and it might make The Vale and Dorne move. If the Lannisters lose Casterly Rock, it might convince the Martells or Lysa to join the war on the 'winning' side.