It was very utilitarian what Itachi did.
Is it justifiable to kill a few people for the betterment of others?
Let's look at it this way: Itachi killed the entire Uchiha clan. Man, woman and child. He killed both his mother and father in cold blood. He killed every Uchiha villager. This included the elderly and children.
Itachi could have simply killed all the men of the village while sparing the women and children. He did not. He killed them all. Arguably, the Uchiha could've gone to war with Konoha. (But let's be real, they would've lost if Itachi could single handedly kill the entire village in a night) Though, Itachi probably should've just murdered the Uchiha clan leaders without killing every single person.