According to a 2015 report: 86% of fatalities occurred while alone ( diving solo or separated from a partner). So I can assume that in the case of separation with a partner it was due to poor training - however I realize that sometimes things have a very unfortunate course despite perfect training.
I knew 4 people I considered to be friends who died while scuba diving. In all 4 cases the divers were alone when they died. In all 4 cases, the divers were very highly trained. Three were certified and experienced cave divers, and the fourth was an instructor who owned a thriving dive operation. In all 4 cases, the divers became separated from their buddies, and in all 4 cases, the circumstances were beyond their control.
The divers just seemed to disappear. One was in a zero visibility cave incident that has been thoroughly analyzed both in this site and elsewhere, but the others were in open water and were consistent with what I have seen in other reports. Divers who are supposedly with a team are just suddenly gone, with no good explanation. In one of the cases, a thorough examination of the gear found no problems, and an autopsy did not find a cause of death. In the other cases, the disappeared divers were never found.
Here is an anecdote that may explain this. I was diving with my daughter-in-law and her young son in calm and clear water on a reef in South Florida. Since they were newer divers, I was watching over them carefully. They were swimming side by side, with me in front leading. When it was time to end the dive, I faced them and signaled the ascent, and they both responded. My grandson and I started a slow ascent, but his mother paused briefly to look at her gauges. When she looked up from her gauges, we were about 6-7 feet above her, and we had both stopped when she had not started the ascent immediately. She began to look around frantically. Where had everyone gone? Where was her beloved son? He was within 10 feet of her, but she couldn't see him.
If someone is within a buddy team and has a medical event, that person may suddenly either rise or fall, and if no one is looking at him or her at that precise moment, there is a good chance no one will see it happen. No one will know where that person went. If that medical event leads to death, then the statistics will show that the diver died alone.