"Or He ruins them" - meaning: causes them to drown; referring to the ships - "because of what they have earned" - [meaning]: what they have done; referring to the people of the ships.