Besides the obvious human error on the part of the ooa diver, the thing I think is significant is that this turned out fine because no one panicked. Equipment failures and human mistakes are common enough. I think how we deal with them often makes a difference in the outcome.
I suspect the diver checked his guage and saw it was at or near zero and sought help, but had not yet reached the point where he could not draw a breath, or the situation may have been a bit more dramatic. I assume after he was on yours or the DM's air, someone checked his tank valve before the ascent?