There's something funky going on with that chart. Military spending is about 20% of the budget when you include Veterans benefits. You're right that it's smaller than the ~50% spent on SS and Meciare/Medicaid, but after those it's by far the biggest budget item.
We did not go from 700 billion to 50 billion spent on the military from 2017 to 2018, so yes, that chart (and the associated data) is bullshit.
There are a ton of technicalities involved in government budgeting and accounting though. It's just not a chart you'd want to share to make an honest point in a conversation like this.
This budget for FY18 looks completely incorrect - where is the $500b+ of defense spending?? It shows up in their FY17 budget, but has shrunk by 10x in FY18.
I never said we spend more on the military than anything else, and the budget you provided just helps to make my point clear. The main hitters of the budget are all social services that are politically impossible to cut. The top non service line items are the VA and defense.