Why did Jefferson Davis hold on to Braxton Bragg as long as he did ? I know they were friends but couldn't he see what an incompetent boob he was in the field ? The man didn't get along with anybody. He might have been a good administrator but as far as running an army he was terrible. Surely there were better field commanders than him in the western armies. I could name a few. Somebody please enlighten me.
Davis and Bragg were not friends, at least not at the time of Bragg's appointment to command the Army of Tennessee (called the Army of the Mississippi at the time). Before the war, Davis had been Secretary of War and he undertook a number of initiatives to reform the army, including the army's artillery arm. Bragg, as the most prominent artillery commander to emerge from the Mexican War, disagreed with Davis's reforms. This turned into a squabble. After Bragg was given an unfavorable posting (assigned to the frontier to "chase Indians with six-pounders"), he decided that Davis had it in for him and resigned.
At the outbreak of the Civil War, Bragg continued to believe that Davis held a grudge (his wife would tell Sherman so at a dinner before the latter departed northward). Though Bragg was the senior antebellum officer from Louisiana, a young upstart G.T. Beauregard was appointed to the command of Confederate troops before Bragg was commissioned. Furthermore, Beauregard was assigned at the flashpoint of Charleston, while Bragg was posted to the relative backwater of Pensacola.
Following the Shiloh and Corinth Campaigns, Davis was facing a crisis in the west. His main commander in the west, Albert Sidney Johnston, was dead. His western and Tran-Mississippi armies had seen major defeats and he was losing ground rapidly. And now Johnston's successor was Beauregard. Beauregard was already a political opponent of Davis, and he performed a number of actions without having the liberty to do so or to have the courtesy inform Davis of his decisions.
This is where Bragg emerges. He was already chief of staff of the army and had exercised command of the Army of the Mississippi when Beauregard was sick or was acting as an army group commander (after Van Dorn's army had come to Corinth). He had received praise for his actions at Shiloh. He had commanded the largest corps of the army there and as a result of his actions, Bragg was made a full general (and thus placed over the other senior commanders, Polk and Hardee). And contrary to Bragg's belief, Davis did not hold a grudge. Up to this point, Bragg had a good military record.
He was a hero from the war in Mexico, his actions in training troops in the Gulf had been highly praised (and these troops were the most disciplined of the Confederate troops to fight at the Battle of Shiloh), and he publicly emerged from Shiloh with a decent combat record (criticisms of his behavior at the Hornet's Nest would not emerge until much later). He had the pedigree and experience for the command.
Cash has already noted that Bragg wasn't as incompetent as it may seem. Bragg actually did pretty well went he started command. He seized the strategic initiative in the theater, saved Chattanooga in 1862, and recovered Middle Tennessee. It his invasion of Kentucky where things start to come apart. Kirby Smith did not cooperate with Bragg and Bragg could not give orders to him unless their armies were together. Polk, who approached orders lackadaisically, refused several orders on the day of Perryville itself. And there was a change in command structure that offended Hardee (who had been acting army commander for a brief period).
Of course, the failure of the Kentucky Campaign came down to several things, including Bragg failing to accurately to guess Buell's intentions (Bragg was consistently poorly served by his cavalry), his split focus between military objectives and political ones. However, Bragg blamed the Kentuckians for the campaign's failure (as they failed to enlist in droves) and this caused a rift between him and that faction's officers.
Various incidents drove the army's command structure apart. A feud with Polk, Hardee openly denigrating Bragg to his staff and junior officers, an incident following the Battle of Stones River where Cheatham fell from his horse and was accused of being drunk led to Cheatham and Bragg falling out, resulting in a rift between Bragg and several of his key subordinates.
Now there were Bragg supporters. Wheeler, Stewart, J.P. Anderson, Bate, and W.H.T. Walker were pro-Bragg. And after Stones River, when Davis first considered replacing him, it came down to one available commander - Joseph Johnston. The discord between Davis and Johnston is well known and Johnston, not wishing to be seen as a usurper, declined to assume command of Bragg's army.
In the second crisis of command after Chickamauga, Davis again had few options. Complicating matters were that Bragg had just won a victory. The only serious options were Johnston and Beauregard. Lee would not leave Virginia, and even if Lee left Virginia, then who would replace Lee in Virginia?
The simple truth of the matter is that the Confederates had only one great army commander, Lee. And Lee could not be everywhere. Which brings us to the crux of your question. What about other field commanders?
Joseph Johnston was the next choice. But Davis and Johnston were barely on speaking terms following Vicksburg. Davis blamed Johnston for losing Vicksburg, and his retreats at Richmond and at Jackson, Mississippi, were troubling considerations for an army that would be defending Atlanta after Chattanooga. And Johnston was a figurehead among the growing anti-Davis political movement in Richmond.
Beauregard was a nonstarter. Returning him to command would be an admission that Davis had made a mistake in replacing him. Like Johnston, Beauregard was an anti-administration figure.
That left local commanders. The senior of which was Longstreet. Longstreet had performed well at Chickamauga but had then made a mess of things elsewhere. He had intrigued against Bragg in favor of Johnston, and his recent performance at Knoxville had been mediocre in the most favorable light. Additionally, Lee was starting to pressure for the return of his best corps commander.
Hardee was the senior subordinate from the Army of Tennessee. Yet he had turned down command of the army before, despite his criticisms of those would assume the responsibility of commanding it.
In the end, it came down to Johnston by default.