It so occurs to me that commercial airliners cruise at altitudes of over 30,000 feet. But why do they fly so high if there are many dangers such as cabin de-pressurization when they can simply fly lower?
Aircraft fly high because it puts them above the weather. This is at least the historical reason why aviation has desired higher flying aircraft over the years and subsequently driven design that way. When it comes to weather altitude gives you diversion options, avoidance possibilities and in some cases the ability to simply fly over a system instead of through it.
Jet engines are more efficient at high altitudes which makes it beneficial to fly them up there (you can find the full explanation of that in this Q/A) but piston planes can fly quite high as well jets have prevailed for lots of reasons and that is a different discussion all together.
As for cabin depressurization that is not really a huge issue. Aircraft are equipped with oxygen masks to keep everyone safe in the event of a depressurization and all aircraft are certified to be able to do a decent from cruising altitude to 10,000ft. (non supplemental Oxygen altitude) in a specified time. Some newer systems will even bring the aircraft down automatically in the event of a depressurization.