While I agree, a referee SHOULD be able to control a match, the ultimate controlling factor SHOULD be the coach. He/she should discourage dirty, unsportsmanlike play; recognize potential problems and substitute accordingly; and generally defuse negative situations.
Many coaches don't. They lose their "s**t" as quickly as the kids, and model poor behavior.