A "castle" holding in CK2 doesn't necessarily represent just the castle, but a barony or county that is overall structured administratively as a set of farms and homesteads governed from a central, fortified position. Having it as a ruin would mean that the entire stretch of land has been abandoned - somewhat possible in Summerhall's case, definitely the case with the Essos ruins - and is of no value to anyone.
Castamere, though, is essentially what would today be military occupation - it's directly controlled by the Lannisters and doesn't need a central castle, even though the basic walls for one still exist. If the Lannisters decide to grant it to someone, the remains of the castle are possibly easy enough to restore to serve as a rudimentary seat, and possibly are still better than a simple tower or keep as most poorer counties have.