Weird, I'm from Brazil and didn't even heard of it.
It's some small city middle of nowhere so it possibly didn't make more than local news, yet somehow went international for happening in a football "event". Stuff like that usually turn out to be gang or drugs related (the stabbing) and then the "crowd" took revenge for the stabbed kid in rage.
Most likely the "crowd" is just the other players and maybe a third team-count of players waiting for their time in the court, people hanging out in nearby bars and local residents that went out to see what was going on, yet the actual doers of the stuff would possibly be just a half-dozen other troubled kids.
Also certainly the police could have gotten there and stopped it all, most likely they were around and just "let it happen". It means the supposed "referee" guy was possibly a well-know troublesome gangta-type in the small city, with possible many crimes they could not prove but everyody was aware of (I can only imagine how bad and slow the law can be in such a place), and so must the city be one with common puplic security problems and many others of his kind. So given the situation they had this momentum against him (i.e. locked down, outnumbered, proven to not be carrying a gun...) they just took this revenge, the police close their eyes, and the crowd went further with "leaving a message" to the others.
Weird indeed, but yeah, certainly everything had a long term meaning to it.
Maybe the guy wasn't even a choosen referee, just tried to force himself into the court to play "power" (I think gangster-types call it "respect"... sigh) and to avoid problems (yeah...) the kids submissed to it, until he wanted to expulse the kid and the kid didn't accept it (most likely it was just bullshit from him to), and then it turned out to be worse.
EDIT:
The above just a guess, because I looked up the font and the websites of the two local newspapers and couldn't find anything about the happening (small local newspapers love violent news), but now found other outlets that reported the fact, it's seems it was some kind of "amateur match" (no details). It's also reported that the threw the knife and it hit the player's chest.
Also, Pio XII is not a stadium (thou I already doubt could eveer bad more than a puplic court) in Santa Inês city (78k inhabitants), but another city instead (22k inhabitants as of 2010, US$50k GDP), and what happened is that it's the police from Santa Inês that dealt with the crimes (possible the closest city with an actual police department).
And actually there seems to be a "stadium" in the city, with a yearly tournament (1st place: US$600, 2nd place: US$300), with uniforms and all which means of course there's a referee, according to this blog: http://blogdepedrolopes23.blogspot.com.br/2010/03/comecou-o-campeonato-de-pio-xii.html
But according to the same blogger it was a "pelada" (random play on public court) and took place in the rural zone of the city: http://blogdepedrolopes23.blogspot.com.br/2013/07/vergonha-por-gilcenio-vieira.html