God created us to have relationships. Primarily we need a relationship with God. He made us to be His, to love Him more than life itself and be loved beyond our imagination's dreams. God also made us to relate with one another. He gives us spouses, families, friends, and necessary strangers to form relationships with for the purpose of helping one another form and remain in a relationship with Him.
Some people in our lives guide us to and keep us with God. Not always, but often these are our consistent anchors. Though just humans themselves, these anchors seem like superheroes because God has gifted them in a way that we are lacking. These anchors through words and actions remind us of who we are not meant to be but also of all God ever wants us to be: His.
Many people God gives us are eye openers. They may be in our lives for moments or years, but they live with us to teach us something that betters our relationship with God. Sometimes these are good friends who one day tell us something that changes our lifelong doubt into belief in a second. At other times these are those unwanted acquaintances who we try to avoid but then one day deliver a personal comment that changes how we view everyone. These are the people who flip a switch on in our minds and transform us to be more committed to and/or aware of our relationship with God.
God gives us some people that we feel we do not ever gain help from. These people drain us, harm us, and act as our antagonist. If asked how they brought us closer to God, our first instinct would be to scoff. However, God does give us frustrating drains to teach us why we do need Him and to help them know God more fully. These are the people who abandon us and so teach us only God will always be with us. These are the people who don't care and remind us that only God truly understands. These relationships are painful in this world but massively edifying in our spiritual relationship with God.
Every person who God passes through our lives is necessary. We do not always notice or like everyone, but the goal of every human relationship and interaction is to bring us to and deeper into a relationship with God. That makes every person in our lives valuable to God and valuable to us.