I think the shihan should have broke it up, but will make allowance for it being crowded on the mat, a very brief time spent in the altercation, perhaps he is short, etc so he didn't see it.
That is where the comment (fairly loud) from nearby helps: the pair now knows others are watching, perhaps even sensei, and sensei gets a heads-up that something is happening. A visiting senior female, while training with me, got frustrated in her inability to do the technique to her satisfaction and relieved the frustration by dropping her knee (and her weight, luckily she is small) onto my spine after I'd rolled over for her to pin me. Perhaps she was hoping for a brawl. I just yelped 'hey, cut it out ____', the instructor looked over, saw her jumping on me during the pin and signaled an end to that technique (and our pairing).
On the other hand, this repeated yonkyo business sounds like puerile hazing, and it makes me wonder just what is being stressed.