$20k/month is a quarter mil a year. Worst case, you live in a high tax state, you might pay $100k in total tax, state + federal + local.
That leaves a take-home of $140k/year. Still almost 3x as much as a soldier making $50k/year.
The larger point is that, yet again, we have a govt bureaucracy handling a budget in hamfisted ways. (Big rigid hierarchy >> underpay recruits >> wow, the org is bloated and still expensive >> we can save money by hiring contractors.) The bureaucracy is is callous to the incentives they're creating.
If it's a much better deal to be a private military contractor vs a soldier, what does that do for morale? For cohesion? For career trajectories? (Get trained, quit asap to go private with a big pay bump...)
This general pattern has a deep historical roots. Many countries at various points in history have hollowed out their formal military by shifting to hired mercenaries. That pattern has a bad track record.
(Additionally, it is not clear to me that GP's example numbers for private contractors were actually modal, or just some high numbers he heard about.)
Depending on your rank and what your active duty is like, much can be excluded.[1]
> Combat pay: Compensation for active service while in a combat zone
Combat zones: much of the middle east, including relatively stable countries that aren't Afghanistan or Iraq, as well as the Balkans.[2]
> Enlisted member, warrant officer, or commissioned warrant officer. If you are an enlisted member, warrant officer, or commissioned warrant officer, none of your combat pay is included in your income for tax purposes.
For officers, the exclusion has a threshold. That threshold is:
> For 2019, the applicable amount is $8,803.50 per month
Or $105,600/yr income not subject to taxes.
In addition to BAH being excluded as you mentioned, there's also BAS, BAS, OHA, other housing benefits, moving and travel, healthcare, all not subject to income taxes.
These are all sources of income (in an accounting, not IRS sense) civilians would need to pay taxes on. As a result, active military pay a much lower tax rate on their income than civilians with the same pre-tax income.
[1]: https://www.irs.gov/publications/p3#en_US_2018_publink100017...