In the Civil War, most of the regiments were formed in the states, a forerunner of sorts to our National Guard system, and most of the Colonels of those units were appointed by the Governors. As you can imagine, the quality of leadership was sketchy, to be sure.
To compound the problem, especially in the Army of the Potomac, political influences were rampant. Officers were in constant contact with Congressmembers and Cabinet members. Much of R E Lee's success can be attributed to the incompetence of the Union officers of that army. Lincoln worked for nearly 3 years to find a General capable of winning the war. In the end he had to pull Grant from the Western theater to actually find success of a kind. Grant had little or no relationship with any of the Washington politicians.
Another more recent example, of course, is in the USSR of the 1930's. Stalin purged almost all of the flag/line officers in the Soviet army, either cashiered or outright shot and replaced them with loyalists. He also placed KGB "advisors" in all units above regimental level. The Soviet army was nearly overrun completely by the NAZIs in their invasion in 1941. In that campaign, some meddling by Hitler helped save the Soviets from complete disaster.
Politics and ass kissing the boss is a poor prescription for winning wars.