Random in the sense that Norman was going to Peter's apartment and just happened to find her there. If Mary Jane, Aunt May or the cleaning lady had been there, they probably would have suffered the same fate.
This is part of why Gwen's death was such a big damn deal. Up to that moment, one of the biggest conceits in comics was that the hero couldn't reveal his identity, even to his girlfriend, because his "enemies would strike at [him] through" the girlfriend. But here, the girlfriend died simply because she was in the wrong place at the wrong time.
I dug out Essential Spider Man 6 which reprints The Night Gwen Stacy Died, and there is no way to make the events ...fit. The implication in the story is that Gwen and Norman's conversation takes place just before Peter shows up but in ASM 121 Spidey look in the window and sees Gwen, Mary Jane and Harry with the Doctor. A Doctor that isn't there in in MJ's retelling. Also, that big long conversation with Norman and Gwen happened in the time it took Peter to change clothes? Doubtful. And when in ASM 121 did MJ forget her purse? Straczynski is reordering the events of an old story (and rewriting dialogue) to make his story work.
And that's cheating.
It's fine to show a flashback to a previous scene and then to continue the scene to show us what happened afterwards but you cannot alter what has already occurred (by another writer even) because all suspension of disbelief is taken away and if that is shattered in a super hero comic book then you've lost your readers.