In sentence (A) the relative clause is essential to the meaning of the sentence. Without this clause we have no clear idea which man is referred to here. This is an example of a defining relative clause.
In sentence (B) the relative clause is not essential to the meaning of the sentence. We know who managed to survive in the sea because of his amazing personal qualities and luck. The relative clause gives some additional information, underlining Edstroem’s courage and self-discipline. This clause can be taken away, and the sentence will still make sense. This is an example of a non-defining relative clause.
Commas are used in non-defining relative clauses to separate the clause from the rest of the sentence. That can’t be used instead of who or which.
Who is used to identify people; which is used to identify objects.
Time: Hans Roger Edstroem from Sweden got into trouble when his motor boat broke down.
Place: They took Edstroem to a hospital, where he was treated for dehydration.
There are some more relative clauses in the text.