The Bible has many cases of people standing up for others before God.
The most striking example is Abraham. He took the initiative to step forward before God on behalf of his neighbors in Sodom and its area. He cared enough to do it, even though he knew how thoroughly wicked Sodom was, and knew how furious God was about it (which explains why he was so careful in speaking to God about it). Moses also stepped in when God was angry, standing in the gap in the most literal sense : offering his own life for that of his nation. (Thankfully, God didn't take him up on the offer.)
It was part of the role of a prophet not just to speak what God speaks, but to speak with God for the people of Israel. A fine example is the exchange between the prophet Habakkuk and God, where the prophet asks for God to act against injustice, but God replies about a coming doom. Isaiah prayed with King Hezekiah to save the nation from defeat and destruction at the hands of Assyria, and the armies were suddenly turned back (see
Isaiah ch. 36-39).
The master builder Nehemiah prayed to God to bring about the rebuilding of Jerusalem and of his people. As they took their concerns to God, the key motivation behind these giants of faith was compassion. They loved the people, the culture, the faith with a love like God's love, and it burned in them so much that they dared to take on God on their behalf. Unlike the gods of the lore of most other lands, this God did not zap them with lightning or turn them into half-beasts. God listened to their cries -- not by ignoring the wrongdoings which got the divine wrath kindled in the first place, but by saving at least some of the people and bringing them back to where they belonged.
The New Testament has its cases of intercessory prayer. Jesus was the prime example of an intercessor. He interceded in prayer for God to bless and protect His followers. At the cross, He prayed, "Father, forgive them, for they know not what they do." Indeed, His whole life, His whole reason for being born, was to be a living intercession, a giving of His life to span the rift caused by our rebellion against God.
Others followed Jesus' example. Stephen's last words were an intercession on behalf of those who were killing him. Paul prayed constantly for the struggling young church, for character, behavior, witness, and wisdom. It is Paul's regular intercession for the church and its people which sets the usual pattern for our own intercessory prayers. And Epaphras was the 'prayer wrestler' for the church in Colossae.
Even at its earliest, the young church was praying for people : for safe travel, praying that people might know Christ through other peoples' witness, praying for healing and health, for rescue, for wisdom, for childbirth, for spiritual growth, for marriages -- asking God to bring benefit or blessing to people other than themselves. The others were not always beloved; they prayed for their political leaders, some of whom were out to kill them. But they knew their God was merciful and was intimately involved with what was going on in the world. And they knew they were called by God to share in that involvement.