As someone who bought a horse he had no business owning, and who still wonders at times why I keep her...it is a matter of degree. If the horse is going to try to kill you, then few riders have any business dealing with them. But what about a horse who spooks & bolts a lot?
Riding a horse is never entirely safe. There are things we can do to reduce the risk: helmets, Australian saddles (IMHO), lessons, a professional trainer, where we ride, etc. If those options will not reduce the risk enough to meet your desires...sell the horse. Or better still, do not buy the horse! But if you get a solid base of riding ability in first, then working to overcome some level of challenge can be very rewarding.
For example, Lilly was an Arabian mare we sold. She & Trooper hated each other with a passion, and my family voted to keep Trooper - who is an excellent horse. However, we bought Lilly unbroke and paid to have her broken to ride. When she was green, I rode her. Shortly thereafter, my youngest daughter rode her. She was not a push-button horse, but she also had no mean in her. At least, no meanness toward anyone beside Trooper!
I would have loved to try to expand my horizons while expanding hers. She was much more graceful than Mia and more willing to boot. Ask her nicely and she would give you her all. She was not a standard beginner's horse, yet she would have been a great horse for a beginner - provided the beginner had an OK seat and was willing to keep slack in the reins. The people we sold her to introduced her to trail riding and I'm told by mutual friends she is doing great.
It is a matter of degree. Each person needs to decide how much challenge and how much risk is too much.
My youngest and Lilly, almost 4 years past now, learning together from the woman who broke Lilly to ride: