It's not that it's uneconomical to maintain the core ship. It's that ships periodically need to be refitted the same way houses get renovated and without a future use to justify that there's no reason to do so.
I've seen detailed photo galleries of former WA state ferries when they go for auction, after they've reached the end of their service life as judged by the state government. Usually at the 40+ year mark. Throughout their service lives they get refitted and fixed up on an almost continual basis, many millions of dollars are spent on maintaining each one, but at a certain point, it starts looking like a money pit to pour funds into continuing to fix up a 35, 40 year old vessel in salt water.
There's some ships on the great lakes which are 70, 75, 80 years old and don't have nearly the same ongoing corrosion issues as similar ones that live in salt water.