Sometimes it seems like they total cars for what amounts to a scratch or busted taillamp, while others are damaged so bad they should be dismantled for parts and yet they are rebuilt.
Sounds like you got really lucky on yours, but flood cars can be a real nightmare, since the electrical systems become unreliable even after an initial honeymoon period with computers and connectors much more susceptible to corrosion over time. Much worse with salt than freshwater flooding too.