Sandy actually did drown on the beach that day. As she drowned, her brain deprived of oxygen, she had a vivid coma fantasy involving her summer fling Danny, where they shared a magical year of high school together. The visions get increasingly outlandish as time passes, until finally, as Danny desperately tries to resuscitate her on the beach, she sees herself flying into Heaven in her dying moments. The entire movie was a drowning woman’s coma fantasy.
The co-creator denies this. But I think he's lying.
Similar theory about Interstellar.