The military budget doesn't only take money away from projects that Democrats love so much but also takes from programs that Republicans depend on.
Also, people who serve in the military are dependent on the U.S. government for the living they make. Many people who join do so in order to make a living. The military social welfare features a web of near-universal coverage for soldiers and their families – housing, healthcare, childcare, family counseling, legal assistance, education benefits, and more. This is the form of welfare that conservatives don't criticize but it's welfare nonetheless.