It's not punishment. The reason air travel is so safe is because every near-miss is root-caused and policies are put in place to prevent the same cause from resulting in a future accident.
Also, it's not a "near-miss." It's a near-hit or near-disaster.