I suspect the reason is a cry for attention.
I'd imagine having suicidal thoughts is along similar thoughts to depression i.e. when you are in deep depression you might not realise it, but suddenly everything feels dark and heavy. It's only when you come out of depression and think back that you realise how ill you were.
It's a remarkable issue of today that we have so many ways to communicate with other people, yet on the flip side we can feel alone and solitary.
It's interesting watching the videos of were people have been talked down from jumping, and how it changed their lives. A couple of years ago there was a programme of a guy who was talked down from jumping by this other guy, and he went searching to try and find him, to thank him. The programme showed his search and eventual reunion with the guy.
I always say a problem shared is a problem halved. It's easy to dwell and take things out of context if we don't have someone else there to bounce our thoughts off.
I wish someone would have stopped the kid who recently stepped in front of a train. It only needed for someone to say "Hello, how are you? What's on your mind?"