They were undeniably men of blood. They had fought side by side. They commanded a nation. Together they were responsible for the death of tens of thousands of people. Who knows how many thousands they had each personally killed. They had a complex relationship with each other as the two most powerful men in their corner of the world. They were cousins, and one was the king and the other the commander of the armies of Israel. They respected each other, feared each other, envied each other. And depending on the circumstances, you could find the wisdom of God more in the words and actions of first this one, then the other. They made quite the team.
Although I can't prove my hunches, it appears on close reading that King David really knew the God of Israel, whereas Joab just knew about Him. David spoke from the intimacies of a real relationship, whereas Joab operated within the ethos of national tradition and culture. David's wisdom was that of walking with the Lord his God. Joab's wisdom was that of common sense, honed and sharpened amidst life's brutalities. David knew of his own sin and brokenness and was thus more compassionate and sympathetic to the weaknesses of others. Joab was drawn to and motivated by power, and David's compassion appeared to Joab as weakness.
Several times, Joab's ruthlessness seemed to either unnerve or annoy David and he seemed intent to displace Joab from his military role. On two occasions after winning local wars against contestants for the throne, David sought to broker peace by putting the commander of the opposing army in charge of the entire army of Israel. Joab's response was to kill the person about to unseat him from his command. David's response to Joab's action was largely to do nothing other than complain about how violent the sons of Zeruiah were. One wonders if David's public announcement of a new leader of the army was little more than good political posturing. It almost seems like David knew what Joab would do and expected him to do it. David then looked good publicly and there was no real shift in power. That, or David didn't really know what to do with Joab. Like I said earlier, theirs was a complicated relationship.
And then there is the issue of sin. David's fall with Bathsheba was covered up with the help of Joab. But God saw through to David's sin and God told David that conflict and strife would never leave his house. David either resigned himself to his fate, or was unable to see certain things because of his sin. Either way, his relationship with his children was a wreck of unaddressed sins. This further strained David's relationship with Joab, who eventually fell in with Adonijah, the second Davidic son that plotted to take the throne from his father. Joab's sin was that of control and power, and conflict was generally settled with the sword. Eventually, his ambitions brought him to death at the hands of King Solomon, and it was David who counseled his son to bring down Joab's gray head to the grave in blood.
And so ended the story of two men whose life together was forged in blood. It ended as it began.