Over the last decade, the U.S. Navy has spent $3.4 billion on attack submarines waiting for maintenance, sometimes for years at a stretch.