I kinda have a problem with the whole concept of Elias. If he's such a nice, cuddly, well-intentioned guy, why didn't he go into a legitimate profession in the first place? That's where the idea of making a mob boss sympathetic and likeable falls down. Sure, you can play such a character as ambiguous, as ultimately hypocritical and clueless for believing himself to be a decent man when there's still so much rot at his foundations. But that's not what they did here. They painted Elias in too idealized a fashion. He just wants to talk to the guy who betrayed him. He's redeveloping a slum building to give back to the community. He's mourning the loss of his dear childhood chum. Aww. It was just too hagiographic. If you're going to call the episode "The Devil You Know," then at least give us a stronger, more honest indication of Elias's devilish qualities. If you want him to be sympathetic, you've already got that covered by casting Enrico Colantoni. So let the writing play at least a little against his innate likeability.
Did you miss the end with the "accountant" where Elias made it clear that he was going to kill all the people who betrayed him and sided with Dominic? If John (who wouldn't allow Elias to execute someone in front of him) hadn't been present at the meeting with the traitor, and Elias hadn't been in the line of fire, and the odds hadn't been so even, I doubt Elias would hesitate to have Anthony kill him right there. Just because he's smart enough to not act impulsively doesn't mean he's forgiving of the betrayal.
He's also not remotely a nice, cuddly guy (and he's only well-intentioned in seeking order over chaos between outlaws, which is hardly an unusual trait of organized crime). He had his
henchman garrote a wounded prisoner in custody in a hospital while he enjoyed watching it, for crying out loud. Also, in the same scene where he had Simmons killed, he quite explicitly spells out that he doesn't think of himself as civilized and compares himself to Simmons directly as an outlier from humanity's more savage past, so he's under no delusions about his nature. Being better than the alternative of anarchy in the streets doesn't make you a nice guy. Coincidentally (or not, because the writers are pretty good at planning this stuff out), that episode was named "The Devil's Share," which was a commentary on the concept of supernatural retribution, but could also be seen as an earlier allusion to Elias in the Devil role and the Faustian bargain Finch and John have struck with him because he's the devil they know.
Mobsters frequently engage in community activism and public works projects, for both selfish and marginally selfless reasons. The mafia's involvement in union activity was to exert some control over the means of production and distribution, but there was also a genuine desire to improve the condition of their Italian or Irish or Jewish or Black (etc.) brethren. They run a protection racket to raise funds that often intimidates small businesses, but it does also provide protection from other less organized criminals that might prey on them. Improving your neighborhood and winning the hearts and minds of your community can pay dividends by making people in your community less likely to report your illegal activities to the police. This is not to say that mobsters are nice guys, but they're also not simplistically evil thugs all the time, either. Check the Real World entries under the
Neighborhood Friendly Mobsters TVTropes page or
this article from Cracked for examples (I can provide more in-depth articles from actual news sources if you like, but I figured those two sites would be appropriate for this discussion). To go full Godwin, Hitler was surprisingly enamored with kids (albeit, only Aryan ones) and dogs. People are weird and complex like that; sometimes even the most evil ones. Mobsters care for their families and friends too.
I think the fact that Elias left an explosive booby trap to blow up his enemies (and possibly himself) if he was cornered and the implied threat of murder behind his more mildly expressed threats for Harold and John not to get in his way while he takes down Dominic's organization make it clear that he's not a nice man and is not to be trifled with, no matter how much he may admire and like them.