Saddam stopped outside Tehran for the same reason we stopped outside Baghdad - we didn't want it. He didn't want it. You take capital cities because you intend to own the country. Those weren't "mistakes", they were strategic decisions. Who the f*ck wants Iran? Or Iraq? Ick.
At the risk of spiraling into a CE thread, that was the flaw in the Bush invasion of Iraq - not that it's exactly a revelation. You break it, you bought it. You don't want it take it home, don't pick it up and play with it.
None of which is strictly relevant, IMO. It's one thing to take territory along the way to your destination. Whether it's slogging from Normandy to Berlin or island-hopping in the Pacific, it's all basically the same. But that's not what's happening, here. Daenerys doesn't need to so much as look at Casterly Rock, much less try and take it. If it has no real value to Jamie Lannister, then it's downright useless to Dany.
The showrunners wanted battles. A whole season of battles. That's as much of a setup as there is. But all these guys writing blogs about the strategic, military intentions of this one or that... It's silly.
Personally, I think Arya kills both Jamie and Cersei, in the end. :)