Both accidents were caused by NASAs insistence on going with a shuttle design, period.
They could have and should have gone with a reusable SSTO instead.
Except physics got in their way.