Any time there's tension in Goodfellas, Tommy DeVito is there, front and center, probably blowing his top and murdering somebody.
Tommy is hot-tempered, frightening, and explosive. It seems anything can set him off. When Henry tells him he's funny, Tommy goes berserk—first on Henry as an uncomfortable joke and then on the restaurant staff for real, beating the snot out of Sonny.
But Sonny gets off easy. When Billy Batts antagonizes Tommy by bringing up his less-than-illustrious past as a shoeshine boy, Tommy straight up loses it and kills Batts. Similarly, when Spider mishears Tommy's drink order at a card game, Tommy shoots him in the foot. Later, when a limping Spider has the nerve to stand up to Tommy, Tommy brings down a rain of bullets and flushes the Spider out. To say Tommy is a loose cannon would be an understatement the size of North Dakota.
Ultimately, Tommy is the mafia's psychotic, foul-mouthed mascot. You know, like the San Diego Chicken, but with a gun and no moral code. With his ruthlessness and unpredictability, Tommy is the human embodiment of the mafia lifestyle. One day, you're in; the next day, you're out.
As long as Tommy plays by the mob's rules and upholds their customs, his crazy-pants behavior goes unchecked. "Tommy's a bad seed," Paulie tells Sonny when the battered restaurant owner appeals for help. "What am I supposed to do? Shoot him?" His family may be less than thrilled with Tommy's erratic behavior, to say the least, but he's still one of their own.
All bets are off, though, when Tommy whacks Batts. Killing a made man—a fully ordained member of a mafia family—is a major no-no. When Tommy gets murdered in retaliation, Jimmy and Henry may be super bummed, but they also know full well that there's not a darn thing they can do about it. As Tommy's story shows, a rule is a rule, even in mobland, and breaking the family's code of conduct will land you 6 feet under.