The defense budget is now the largest component of that discretionary spending. It is also one of the easiest parts of the budget to be directed to a specific area or for a specific task. These are the dreaded earmarks. This also means that localities may become dependent on defense spending being directed by their Senator or Congressman. John Murtha (D-PA) has made a career out of sending defense dollars to Johnstown, PA.
That is why you will constantly see articles in the local press like this one "Leaders focus on reaping defense spending benefits at S.C. bases" in the The Greenville News. Areas can become dependent economically on receiving this money to aid their economies. It also leads them to lobby their representatives and the military to gain more work and money.
Of course when a program ends or is cut or the earmarks goes somewhere else it hurts the local economy. The biggest argument against Obama's plan to end the F-22 was that it would end a lot of jobs in the middle of a recession. In fact there are those who argued rather then the "Stimulus" passed by the Congress it would have been better to ramp up defense spending as a more direct way to get money into the economy.
The problem has been that the U.S. defense budget on the fringes has been corrupted by Congress to be a piggy bank for local spending. The Representatives trade among themselves to use the money to fund favored projects or companies. These may only be little amounts for each thing or year but over time they add up. A $100 million is not much in a $2.5 trillion budget but it buys some company and their employees quite a bit. The budget should in a perfect world be distributed efficiently and based on the needs of the services.
The defense contractors too get involved through lobbying for programs and contracts to be initiated or kept going. This is obviously in their best interest as it keeps revenue and profits up. This too though distorts the budget process with the services perhaps ending up with equipment they don't want and then have to figure out a need for it. The C-130J is an example. The U.S. Air Force wanted to stop procurement for a few years as it figures out how to militarize the aircraft and integrate it into the fleet. Congress kept adding aircraft every year. The C-17 is another example but in this case Congress' additions worked to the Air Force's favor as the heavy lift aircraft are being used extensively in Afghanistan and Iraq. The Defense Department tried to stop buying them and Congress kept them funded. In some cases it does go both ways.
Unfortunately we don't live in a perfect world.