I'm just spitballing here, but Medicare and Social Security are funded by their own tax. Military is therefore the largest expense funded by our regular federal income taxes, which is where Congress operates with discretion and chooses to prioritize that over things that help people.