But these tragedies and tests were experienced in the early stages of within-the-atmosphere flight. While we are still learning about creating a safer and more efficient airliner, we had some bumps and tragedies we had to overcome in the past to get it to where it is now. Take for example the De Havilland Comet aircraft. It was the very first production jet airliner, but within a year of its commercial service, it had tragic accidents that led to 13 crashes with about 440 deaths total. We later learned that the stress in the edges of the square windows compromised the structural integrity of the fuselage which led to catastrophic failure.
This is why the windows on your 737, 747, etc are now rounded.
But through these tragedies and innovation, we not only gained knowledge on how to build a better aircraft, ticket prices also decreased substantially in price.
Space travel right now is right where the air travel industry used to be when it was just starting out: we are still working out the kinks, and to quote Sir Branson, "Space flight is hard, but worth it".