It's all BS. The rules say you can't leave the bench and you can't engage in a scrum from the bench. Therefore,. the Heat players should have removed themselves from the fight towards the end of the court.
The rules don't say "you can, however, enter into a fray if it's directly in front of the bench and shove opposing players into the stands ( O'neal) and throw elbows ( Haslem)".
It says YOU CANNOT ENTER INTO A FRAY, period.
In reality, had the Refs been doing their jobs, this probably wouldn't have happened.
And the only person who probably should be ejected is Quentin. You have to punish the instigator the hardest, always.