There are a lot of commissioned officers at the paygrades of O-1 to O-2 in the military that are making far more than 40-50k/year.
Most 1LTs that I know are pulling $80+k/year in New Jersey and living in a decently low cost region. Don’t forget that probably only 60% of that is taxed due to a sizeable portion being “Basic Allowance for Housing”.