I don't think we can speak in general about horses that are "not quite right upstairs", as some say around here.
Those come in all flavors of "different".
I call those horses "quirky".
You live with, manage, train and ride the horse in front of you and learn to deal with whatever that horse is.
If some of those quirks makes a horse really dangerous, you can keep working to get them over it, or see where that horse would be a better fit.
There are way too many reasons for those few really dangerous horses.
A friend had one of those, wonderful ranch horse, that he bought as a four year old from a cowboy with a broken arm, courtesy of the horse.
That friend did great with the horse, until one day, he doesn't know what happens, the horse bucked him off and ran thru three fences.
They found him standing in a draw, addled looking.
The friend doesn't remember because he ended up in the ER for a week.
For what he said, he was just long trotting down the pasture from one windmill to the other, checking water holes, as he did regularly.
Well, he kept riding the very nice horse, that didn't get hurt in that fracas and another year later, the same happened with the same results, friend in ER for a week being put back together.
He kept riding the horse and a few years later, the same again and this time, he gave the horse to his nephew, that is much younger and he used the horse until he was retired, but said that he too had a few times some wild rides on that horse, that would, according to him, out of the blue, just lose it, without obvious rhyme or reason.
He was eventually retired, no one else wanted to ride him and became a pretty pasture ornament.
We wondered if he had a touch of loco weed when young, not enough to show, but maybe had enough brain damage to have short circuits at times and some of those ending up with those blow-outs.
No one will ever know.
Some times, you can find why a horse is quirky and fix it, or a way to manage it and some other times, you do the best you can, but the horse will always be a bit "special".
As some say, with some horses, "when a horse tells you who they are, believe them".