Most stories involve more than one character. Even classic castaway Man-against-Nature stories, like Robinson Crusoe and Gary Paulsen’s Hatchett, include the protagonist interacting with other characters at the beginning and end of the story.
Characters get grouped into several categories. First are the protagonist and viewpoint characters, who may or may not be the same person. Then you have major characters who play a large role in the story – the villain or antagonist, the sidekick, the romantic interest, parents, BFFs, etc. Next come the secondary characters, the minor characters, and finally the walk-ons or spear carriers.
Walk-ons are the faceless folks at the outer periphery of the story, who are only mentioned at all because logically somebody has to be watching the city gate, taking tickets at the amusement park, serving the drinks and canapes, and generally populating the world your Hero is busy trying to save. They are the city guards, waiters, janitors, housekeepers, valets, bellhops, drivers, stormtroopers, postal carriers, dressmakers, and random people crowding the sidewalk or the spaceport lounge. They rarely have any dialog other than something obvious like “Would you like fries with that?” or “May I take your bag, sir?”
Lots of writers don’t think much about these folks until their character starts to walk into the lounge of the train station and they suddenly realize that the place really can’t just be empty. In a lot of stories, this works just fine. The protagonist and his/her small circle of major characters have more than enough to be going on with; there’s no need for additional complications.
Because quite frequently, what happens when a writer does start thinking about one of these people is that they start growing more of a personality. As soon as this starts showing, the character graduates from walk-on to minor, especially if they have a couple of lines of dialog or a page of conversation. Often, the writer really likes this new character, and brings him or her back in a later scene or two, which quickly upgrades the character further, to secondary character. If the character develops their own subplot, their status as secondary character solidifies; if the subplot becomes important to the central plot and/or the character starts getting viewpoint scenes, the character can end up joining the ranks of major characters. And even the most massively sprawling multiple-viewpoint epic series does not have room for the writer to do this with every Uber driver, lab technician, army private, or random pedestrian in the story.
Tempting as it is to just ignore walk-ons, or treat them as self-moving props, it is actually quite useful to put a little thought into who and what they are, if only to have some idea who-all is likely to be around in certain settings. The walk-ons are the general population from which your minor characters and secondary characters are drawn (and often the major characters and protagonist as well). If you know what kinds of jobs people had in medieval castles and villages, you can give everybody more interesting things to do. Space stations can’t be populated exclusively by scientists and engineers; medieval castles had blacksmiths and farmers and weavers as well as guards and cooks and grooms. Western towns didn’t just have a sheriff, a tavern-owner, a prostitute-barmaid with a heart of gold, a couple of outlaws, and a bunch of generic townspeople; all those townspeople had jobs, too. And they weren’t necessarily the same in every town.
Even when the spear-carriers are just that – a massive army carrying spears – there is potential variation that can make them more interesting (without necessarily leading the writer down the path of ever-proliferating subplots for ever-increasing numbers of minor and secondary characters who keep wanting their own books). Armor and weaponry has not always been standardized, especially during times when yeomen were expected to bring their own arms and armor when they were called up by their lord. Even when it is standardized, armies keep having to make rules to keep soldiers from adding or altering their uniforms, because there’s always one guy who wants to wear a blue bandanna instead of a red one, or a turtleneck instead of a collar. And that doesn’t even mention the designs they paint on their airplanes, bombs, and guns.
You can imply a lot about the culture of your world, how cosmopolitan your cities and countries are (or aren’t), and how much diversity and prejudice there is (or isn’t) by how you handle your walk-on characters. If your main character stops for lunch at her favorite Mexican restaurant, where she tells the waiter that the Korean chef did his usual fantastic job, that tells the reader something about the world your protagonist lives in and about what she takes for granted.
If you want a faceless mass of identical stormtroopers in white armor because you want to imply something about the government that created them (heck, they’re clones – they’re even identical inside the armor!), that’s fine. But if your Evil Hordes and Armies of the Light are all the same simply because you haven’t thought about them much…you might want to stop and consider. If you have good reasons for populating your city with identical men in gray flannel suits, that’s fine, but you had really better be aware that most real-life cities don’t look like that, even at noon on a sunny day when all the office workers nip out for lunch. In other words, you can do what you want…but do it on purpose.