In an ideal sports world, referees would not be humans. They'd be highly functioning subhumans devoid of any emotion, desires and just about anything but the sole focus to fairly enforce the rules of the game. Of course, they are humans. Humans who like to get drunk and piss in ice buckets. Humans who have hate for teams. Humans who lose their tempers.
Deadspin published a story from Tim Donaghy, "the former NBA referee who spent 11 months in prison for relaying inside information to gamblers," in which he recounts how a hungover ref (with a penchant for pissing in hotel ice buckets) almost cost the Heat a game in their 2006 playoff series against the Chicago Bulls.
[The ref] was hung over, and I knew he was not gonna take any shit from the Bulls. The NBA didn't want the game to be very physical, and with Skiles and Nocioni and Chandler, I thought for sure he'd snap on Chicago at some point. Boy was I wrong. What happened was, he snapped on Miami instead. In the first half, Udonis Haslem goes to the basket and thinks he gets fouled. Haslem turns around and starts jawing at the ref. He says something back to Haslem. Haslem takes his mouthpiece out, throws it at the ref, and gets royally tossed. The ref then goes over to the scorer's table. The radio announcer says something to him, and the ref tells him to go fuck himself. Now he's really pissed. At halftime, Miami's up by 12, and the ref storms into the locker room, saying: "Fuck Miami. Fuck that owner. Fuck that radio guy. Fuck 'em all." I'm doing everything I can to calm him down, because I dropped a wad on Miami. He goes out in the second half, still pissed, and all of a sudden the lead evaporates. Chicago's raining in threes like crazy. I'm in the locker room watching on television, thinking, "I'm fucked." Miami's leading by four in the last few seconds, and Antoine Walker gets fouled. Makes one, misses one. They don't cover by half a point. And I'm out three grand partly because my colleague, the venerable ref, had an ice-bucket night and got pissed at the wrong team.
Deadspin helpfully points out that the ref who ejected Haslem was Joe Crawford, no stranger to controversy.
The bad ref-ing didn't matter much. The Heat went on to win the series 4-2, and obviously took home the championship that year.