I
always walked right down the middle of the tracks when I was a kid. We all did. We would have considered anyone who insisted on walking in the ditch 'weird.' Kids are kids. They take chances. They always have, and they always will.
Several of us got caught out on a long trestle over a river when I was 10 or 11. We all survived unscathed, but it got rather interesting for a bit.
We took risks that we thought were manageable. In that case the risk turned out to be barely manageable, and had we panicked, it probably would have been fatal, but it all worked out, and we came away wiser for it.
Hard to say why these particular kids didn't realize the train was upon them. Unless there is some sort of revelation in the press, we will probably never know.