Frankly, it's amazing that this sort of thing doesn't happen more often.
They were undoubtedly doing training involving a merge to a visual fight. It is very easy to lose sight, and if both pilots do, and there is a conflicting flight path, BANG and you're now ejecting.
To get an idea how hard it is to see a fighter-sized airplane... the next time an airliner flies overhead, look at the airlplane at the head of the contrail. That airplane is a jumbo jet about 6 miles away. It is a tiny pin prick. Imagine now if it was a fighter. And six miles is close-ranged with modern weapons. An F-5 sized jet is invisible when nose on and outside of 2 miles. It is simply beyond the ability of the human eye to resolve. And two miles goes by in about 3 seconds at typical closure velocities.
Every movie ever made shows a fake air combat with the airplanes WAY too close, by a factor of about 50. They have to do this to make the film watchable. The reality of it is that your enemy is a tiny speck, even in a visual fight, and when you add 7 to 9 G's, your eye simply cannot resolve him.