The "renting it from the bank" argument is nonsense. Buying a house offers many benefits (and risks), but paying a mortgage allows you to build equity and claim a large tax deduction.
Hanging on to property as an investment can be beneficial to your taxes as well, but there are a few things to be aware of. As an example, I purchased a house in South Carolina in 1991. I left in 1994 and rented it out. On my taxes I was able to deduct not only the mortgage interest and property taxes, but a depreciation value. By deprecating the house I got another large tax deduction. HOWEVER, there is a catch. If you depreciate you may have to pay capital gains on the profit if you sell the house in the future. The tax code used to say that if you lived in the house two out of the last five years you could recapture the depreciation and not pay capital gains. As I recall the law recently changed and M2 posted about this not to long ago, I think the time period has extended especially for military. It is a bit of a risk, as in my case I have no intention of returning to South Carolina so when I sell the house I will have a large capital gain penalty to pay (a great problem to have).
Bottomline, if you are in a weapon system where you think you might have multiple assignments at the same base, then I would buy a house and rent it while I was away.
Each time you return you will be able to “recapture the depreciation” and basically enjoy an extra tax break each year.