Ultimately, Tommy doesn't get away with being a psychopath - he's killed at the behest of his superiors.
For a time, Tommy gets away with murdering Billy Batts because his superiors don't know for sure that Tommy killed Billy Batts. If I remember correctly, only Jimmy (Irish) & Henry (half-Irish) are present for the murder. They're not made men (and cannot become made men because of their ethnicities); they're more loyal to their friend and co-worker, Tommy. Additionally, having helped dispose of Batts' body, they're also now complicit in his murder and could be punished, too.
Spider, on the other hand, isn't a made man, well-connected or a good earner, so his murder is of little consequence. Unlike murdering a made man, this (apparently) doesn't breaking any mob rule. Insightfully, Henry describes the mob power structure as follows:
All they got from Paulie was protection from other guys looking to rip them off. That's what it's all about. That's what the FBI can never understand - that what Paulie and the organization offer is protection for the kinds of guys who can't go to the cops. They're like the police department for wiseguys.
Apart from a few rules, like not murdering made men without approval and always paying the necessary tributes, wiseguys are largely autonomous. Tommy may be a psychopath, and he may not have many friends, but he's a good earner. Yes, people - as we see in the "you think I'm funny?" scene - are afraid of him. But Tommy hasn't committed serious offenses (that Paulie/superiors can prove) in the eyes of mob. Paulie gets his cut. Henry & Jimmy need him as a part of their cohort. So everyone is willing to put up with his crazy behavior.
Tommy & Spider
I disagree that there's an arc to Tommy's character. Apart from brief scenes of him as a teenager, I don't recall him ever being anything but a feared psychopath. Both Spider & Tommy are errand boys - but Henry, too, began as an errand boy. It seems to be a mob rite of passage.
I think the more interesting parellel is that Tommy, growing up, was bullied by Billy Batts (also, this is the only thing we get that's close to an explanation of Tommy's behavior). Now an adult, Tommy harasses Spider. This could be interpreted as ritualistic hazing or, more likely, as Tommy getting "revenge" on Billy via Spider.