One function those background characters have in a scene is to reveal things about your story world's culture, including gender roles. This may not be as needed in a contemporary work, but in a work of speculative fiction (or in a particular historical setting), it can clue readers in about how things are in your society. Do women and men fill many of the same roles in society, or are they strictly segregated, or are they somewhere in between? How diverse is your society in terms of race? How do children occupy themselves in this society? How do people of varying ages, genders and classes dress and carry themselves?
Even so-called throwaway scenes can (and should) accomplish things in a story.
An amazing number of books, even those set in contemporary or futuristic societies, have few women out and about in the world. Think of that Hollywood casting issue,
where most speaking roles go to men (and to white men at that), and even
crowd scenes are male biased (and the
casting calls are pretty
sexist and racist too, often requiring
younger women and emphasizing good looks over personality traits). This sort of thing seems to influence people's perception of reality, and it makes its way into books.
Even in a very traditional society, women are everywhere (unless the culture is so patriarchal they literally keep women of all social classes cloistered, but that's not the norm), yet they are often not mentioned or noticed by the narrative. Of course, this could reflect a genuine pov if you are telling the story through the eyes of a sexist character who dismisses the existence or importance of most women, so he simply doesn't "see" them. But if this is not the author's conscious intent, it's something to think about.
It's amazing how many stories with female leads have the character adrift in a support cast that is almost entirely male, with any other female characters being trivial or portrayed as rivals or obstacles. McCaffrey's Dragonflight, for instance, has only a handful of named female characters but dozens of male ones. Sometimes the isolation of a woman in a "man's world" is a major point of the story, but often it reflects unconscious biases about who is most important and interesting.
I've seen more books recently that rectify this, with friendships and relationships between women in a more central position and portrayed more positively.