The real world is more complicated than just 'overpriced to the military'.
To heavily paraphrase the story: The US military has a number of unusual requirements that are not cheap to meet (security, extra review, etc etc). SpaceX originally balked at a number of those requirements, but after a fair bit of back and forth, they eventually threw up their hands and said "Sure! Whatever you want, but you have to pay all the extra costs". And so the US military launches are significantly more expensive than the commercial launches, but the large part of that is because the costs are genuinely higher.