There are places to streamline things and keep your character count low. Query letters, for instance. But in other places, it makes sense to name names, even if a character is unimportant to the overall plot.
In real life, we know a lot of people's names, and we use them to think about those people. Or if we don't know names, we use descriptions or our feelings about the people. It might be simplest and most straightforward to describe someone as "a classmate," but who thinks in terms like that? It's not "a classmate asked me for a pencil," it's "Ashley asked me for a pencil." Maybe "Ashley Green" if you don't know her that well and feel a bit more formal. If you don't know her name, it might be "the girl with all the eyeliner" or "a kid from the volleyball team." "Classmate" or "another student" is accurate, but feels like a weird way to describe a specific person you encounter regularly. See also "coworker," "teammate," and other people whose names you'd likely know.
I think writers sometimes fear the "name soup" problem - that there will be too many characters' names, and readers won't know which ones to pay attention to. Which, again, is a concern in query letters, where you have limited space. Because the plot summary in a query may be just a few sentences, it's hard to give important characters the emphasis and weight that lets readers know that these are the ones to remember.
In a novel, though, readers can handle having name-drops that they aren't expected to keep in mind forever, because this happens in real life all the time. Servers introduce themselves at restaurants; you meet people at a conference who you'll never see again; you hear a researcher's name in a news story. Do you remember all those names? Probably not. Does it confuse or bother you to hear them? Probably not.
We often use people's names when we're talking about them in real life, too. It's generally much more realistic to say "Michael and I went to the skate park" rather than "A friend and I went to the skate park," especially if the listener also knows Michael.
Because this is me here, let's have some examples of skillful name-dropping from Harry Potter!
- Remember Mr. and Mrs. Mason? If not, don't feel bad. They're "a rich builder and his wife" who have dinner at the Dursley house at the beginning of Book Two. They only matter in that their visit is occasion for Harry to be forced into hiding, at which point Dobby arrives, ruins the dinner party, and gets Harry in trouble. But given that the Dursleys put a lot of planning into this dinner, it would be weird if Rowling had decided to avoid ever using the Masons' names just because they don't have any continued importance to the plot.
- The use of characters' names can be delightfully sneaky when it's casual enough that you forget it until later. When Harry meets Cedric Diggory and his father, Mr. Diggory mentions the Lovegoods to Arthur Weasley. It sounds natural - two adults discussing mutual friends or acquaintances Harry doesn't know - and most readers probably forget it quickly, as Harry seems to. Then we meet Luna Lovegood in the next book. Lovegood. Now why does that sound familiar . . . ?
- Many of Harry's classmates never do anything of great importance in the books, but we feel we know them because their names pop up every so often. This makes a lot of sense: Hogwarts isn't that big a school, and Harry would know the other kids in his year, and some of the ones older and younger than himself. They're present in his everyday life, and we get a feel for that through dozens of tiny moments that aren't individually important: Lavender Brown answering a question in class, Pansy Parkinson complaining about Hagrid, Dean and Seamus interrupting a sensitive conversation between Harry and his closer friends. Bonus: it doesn't feel like the character came out of nowhere when one of them DOES do something notable, such as start dating Ron.
You can overdo it with names, of course. Too many can be a kind of infodump: the writer has put so much work into building her world and developing every character in it that she doesn't want to leave any out even when including them doesn't feel natural. For instance, in reality, a character who is on a soccer team would likely say, "When I got to practice, the rest of the team was already there," rather than, "When I got to practice, Sarah, Natasha, Alice, Lauren, Karina, Jamini, Melissa, Tenesha, Maya, and Emily were already there." If the book is written in a conversational style, you might pull off naming the whole team in a more intentional way: "When I got to practice, the rest of the team was already there. What you have to know about the Mountain Goats is that only half of us are any good. Specifically, Natasha, Lauren, Karina, Alice, and Jamini, who were running drills when I arrived. Maya's parents make her play, but she hates it. Tenesha only joined the team to support Maya. I convinced Sarah, Melissa, and Emily to join with me, and I'm only playing until I figure out who murdered the team's last coach."
Rather than write a proper conclusion, I leave you with this masterpiece: