The theory I like as to why it happens is that one ill or disoriented whale beaches and then his distress cries cause his fellow pod members to beach themselves coming to their fellows aid.
“Multiple beaching of whales happens fairly frequently today.”
But they don’t turn into fossils - they decay.