The ship was wrecked and washed ashore by the waves.
Getting to land is not difficult, because the shore is close. The difficulties will begin when the enemy appears, and also when a choice arises: to save supplies, a wounded sailor or yourself.
A shipwreck is a big feeding trough for sea predators and underwater hunters. The shore is your safe zone.