Do good to Zion in your good pleasure; build up the walls of Jerusalem; then will you delight in right sacrifices, in burnt offerings and whole burnt offerings; then bulls will be offered on your altar. – Psalm 51:18-19 ESV
Psalm 51
David had sinned against God. What he had done had been a personal affront to the sovereignty and holiness of God. David had disobeyed God's commands and he had come under the judgment of God for his actions. But as the king of Israel, David's sins had a far more global impact. As the nation's divinely appointed leader, his actions would have far-reaching ramifications. Not only would David lose the son born out of his illicit affair with Bathsheba, he would endure years of watching his family implode. The prophet, Nathan, had warned him. “Now therefore the sword shall never depart from your house, because you have despised me and have taken the wife of Uriah the Hittite to be your wife. Thus says the Lord, ‘Behold, I will raise up evil against you out of your own house. And I will take your wives before your eyes and give them to your neighbor, and he shall lie with your wives in the sight of this sun’” (2 Samuel 12:10-11 ESV). And these intra-family disputes would end up having a dramatic influence on the entire nation of Israel, because they would lead to the eventual takeover of David's throne by one of his own sons. David's sin would end up negatively influencing the entire nation of Israel, and he knew it. So David closed his prayer with a request that God would “do good to Zion” and “build up the walls of Jerusalem.” He was asking God bless the nation and protect it. He knew that, in reality, it was God who had made Jerusalem great and had turned the people of Israel into a powerful nation. David's selfish, passion-driven sin with Bathsheba had put the entire nation at risk. As the king went, so went the nation. His leadership set an example for good or bad. We see over and over again in the history of the kings of Israel and Judah, that when they served the Lord faithfully, the people followed their example. But when they rebelled against God, the nation did as well.
David's own son, Solomon, would prove to be a prime example of this truth. Late in his reign, in his old age, after having given in to his love affair for women and having amassed for himself 1,000 wives and concubines, he began to worship their false gods. Solomon had disobeyed God's explicit command forbidding the kings of Israel to marry multiple wives. He had also disobeyed God's command to not marry outside the nation of Israel. “For when Solomon was old his wives turned away his heart after other gods, and his heart was not wholly true to the Lord his God, as was the heart of David his father. For Solomon went after Ashtoreth the goddess of the Sidonians, and after Milcom the abomination of the Ammonites. So Solomon did what was evil in the sight of the Lord and did not wholly follow the Lord, as David his father had done” (1 Kings 11:4-6 ESV). And the people would follow their king's example, worshiping false gods just as he had done. As a result, God split the kingdom of Israel in half. He divided the nation and a long line of kings would rule and reign over the divided kingdom, many leading the people into further sin and rebellion against God.
So David prayed. He begged God to bless the nation in spite of him. He realized that Israel's glory was the result of God's goodness, not his effectiveness as a king. Any blessings that Israel enjoyed were the result of God's goodness. Any military victories they had experienced had been God's doing, not his own. David knew that, without God's help, Israel was defenseless and his leadership as king was ultimately useless. They needed God. And David was not content to simply pray for himself. He felt a strong responsibility to lift up the entire nation and intercede for them before God. David knew that he had let his people down. He had failed to lead responsibly and had put the nation at risk with his actions. They needed a righteous ruler and a faithful sovereign, and David knew that God was the only one who fit that description. God's blessing of the nation would result in the people turning back to Him. They would recognize His sovereign, powerful hand and once again offer Him the sacrifices and offerings He demanded and deserved. David understood that if God could create a new heart for him and renew a right spirit within him, God could do the same for the nation of Israel. He was asking God to do what only God could do: Restore and renew the nation. He wanted God to bless and protect them. David may have failed, but he knew His God never would. David may have proved himself unfaithful, but he was counting on the fact that God never would.