I've had some excruciating taxi rides in my life, but at no point in my life has a taxi driver taken his car off the road, driven onto train tracks and driven head first into an oncoming train.
But this is Grand Theft Auto V. Anything can and will happen.
Yet this is still hilariously weird. I'm a big fan of taking taxis in Grand Theft Auto, because I don't really like driving in games, and I like to play through the story missions quickly, but I've never had anything remotely crazy happen in a taxi. Sure, they'll often crash into other cars but that's it.
It looks like it must be some sort of error in path-finding or something. Either way, hilarious.