It’s certainly to make you feel something.
The Last of Us Part 2’s Co-Writer Halley Gross said that every single Last of Us 2 enemy in the game has a name, and those who are with them will yell their companion’s name when Ellie deals a deadly blow. These details were added to humanize those that Ellie is up against and make players think twice about their interactions with non-player characters.
“Even in gameplay, we want you to feel the micro-hard choices these characters have to go through,” she said in an interview. Players can either choose to have Ellie fight her way through enemies and confront them head on or sneak her way around them and risk being caught.
It’s a neat trick to humanise the enemies specifically to make the player
dehumanise them as they rampage, as the player character also does. Instead of the game dehumanising them for you by default due to them being nameless, faceless goons.