Statistics show that diving is safer than swimming and that many other mainland sports. There are potential risks, and that is why you need to attend a course.
Likewise, diving is the same as driving a car: if you follow the rules and use common sense, there should be no danger.