Flags, in their simplest form, are tangible symbols of intangible ideas - nations fandoms, sexualities, and even fictional places. All of these things exist only within the human experience, and somehow simple colored pieces of cloth are the way we outwardly express these complex ideas.
When the 8-stripe rainbow flag debuted in 1978, it was the perfect symbol to unify those fighting for gay and trans rights. Since then the Gilbert Baker's rainbow flag (simplified to 6 stripes) has been a prolific symbol of hope and community that those that identify as LGBT+ can congregate under. With the power that a flag can have for a liberation movement, it was inevitable that more niche flags would follow.
That idea started to snowball in the 2010s as more and more young people were finding their own queer communities online and there became an effort to expand on ideas of gender and sexuality. This became a movement known as MOGAI (Marginalized Orientations, Gender Alignments, and Intersex) and meant to create a more inclusive community than LGBTQIA+.
Even though it was short-lived, the MOGAI movement made a lasting impact on the queer community. Without it, we may not have many of the popular pride flags we see today like the Lesbian, Nonbinary, and Asexual flags.
People adopt labels when they recognize their lived experiences in others and come together to share in what they have in common, and fly flags to showcase to the world around them, a little piece of who they are. As a community where so many of us spend so much time hiding our true selves or being discriminated against for it, it makes perfect sense that a flag would be the most widely loved tool for LGBTQ+ people to showcase their identity.