When you pray for someone, say for a friend who needs to lose weight, you are dealing with at least three volitions: There is your friend's own choosing/acting/free will, which obviously does not disappear when you pray for them to make certain choices. There is God's perfect plan and sovereign will for the situation as He looks down and in His wisdom steers people according to His plan; obviously He will not move in a way that thwarts His perfect will just because you pray otherwise. And there is your prayer (and mine), which, according to the Bible, has power to move God and people, but obviously (thank God) is not sovereign.
So what exactly does intercessory prayer do? It doesn't over-ride your friend's will; it doesn't make God act differently than He knows is best. Yet Jesus said repeatedly that it does make a difference with God and man and history.
Will someone not be saved because I didn't pray for them? Because I didn't pray for them enough? (Jesus taught the importance of persisting in prayer). Because enough people didn't pray for them enough? Surely no one will be denied heaven because someone else was slack in praying! So does intercession do anything? Jesus says, emphatically, YES!!!
So what does it do?
I don't exactly know (and neither do you!).
But I believe that part of it must be to show us the interconnectedness of all lives. My life, God's Life, your life, (and everyone else's lives) are all interconnected in mysterious and unfathomable ways. God ultimately controls the circle of connectedness but you and I have the God-given ability to add fresh input into the circle and so affect all the connected parties.
Sometimes God over-rides your acts and my prayers, sometimes He honors our choices, even if they aren't what He would have chosen. When I'm tight with God, my prayers tend to more closely reflect His will and are more consistently effectual ("If you abide in Me and My words abide in you, ask whatever you wish and it shall be done for you.").
Many years ago I was deeply moved to pray fervently and consistently for my younger sister for a year. I had little contact with her that year (2000 miles away) but she met a Christian guy (to whom she is now married) and became a Christian that year. She chose to respond to God's grace, God intended to save her before He prompted me to pray, but my prayers brought me into God's plan and were part of the circuit.
The absolute literal truth: No man is an island. But how prayer works is still a mystery to me. But then so is advanced physics. And people are more complex than particles!