It ends up being a cost optimization & liability thing. Lets be honest, at least in the USA, our Government isn't terribly efficient with money. However, a corporate is driven by profit so they will be smarter.
If you had an Air Force squadron of older planes, they need their own dedicated mechanics who are certified. Government certified vendors, who've gone through the vetting/price bidding process (likely the vendors selling you the latest F35 or whatever will want in on it too...). Dedicate pilots certified to fly these planes and likely only these planes... etc. Instead you shift the logistics to a smaller and more agile group who can optimize for their very specific and small use case.
The private contractor can also go out and train people from other military forces (like Canadians, eh?). That allows them to make money from multiple sources, where as the US Government would not. Sure maybe join training exercises, but that's not the same thing.
There are a lot of cases in business where outsourcing something specialized to another party makes a lot of sense - unless there is a huge scale for it. Just look at The Cloud. For a lot of companies, it doesn't make sense to pay the overhead of datacenters, datacenter techs, etc etc. For a few companies, that do it at scale, it makes a ton of sense (Ex FAANG).
These are all real cost reasons, but there is an important reason you are missing: people. Firstly, pilots don't receive much training benefit from being cannon fodder for other pilots; they are not learning to operate their system (whether Super Hornet or JSF) but emulating another aircraft (e.g. a Sukhoi). The situation is slightly different for the agressor squadrons, as they are emulating the most dangerous threats (like J31 or PAK FA). But for everyday readiness training, spending time as the red force is not a joy.
Second, the USAF has a pilot numbers problem. The more experienced pilots are getting out as fast as they are able; there are many reasons for this, and COVID-19 will slow it down, but it will continue. To compensate they are trying to ram more in at the front of the funnel. This will cause other problems, not the least of which is a massive shortage of training personnel, causing overwork, causing more FCIs to leave, and so on.
The ex-USAF (and ex-RAAF) pilots flying these jets are enjoying not being sent overseas to shitty bases on long tours, or having to move their family interstate regularly, or dealing with braindead administrative detail and mandatory fun exercises some Colonel dreamed up. They are some of the best pilots around, and normally they would be lost to the airlines.
If you had an Air Force squadron of older planes, they need their own dedicated mechanics who are certified. Government certified vendors, who've gone through the vetting/price bidding process (likely the vendors selling you the latest F35 or whatever will want in on it too...). Dedicate pilots certified to fly these planes and likely only these planes... etc. Instead you shift the logistics to a smaller and more agile group who can optimize for their very specific and small use case.
The private contractor can also go out and train people from other military forces (like Canadians, eh?). That allows them to make money from multiple sources, where as the US Government would not. Sure maybe join training exercises, but that's not the same thing.
There are a lot of cases in business where outsourcing something specialized to another party makes a lot of sense - unless there is a huge scale for it. Just look at The Cloud. For a lot of companies, it doesn't make sense to pay the overhead of datacenters, datacenter techs, etc etc. For a few companies, that do it at scale, it makes a ton of sense (Ex FAANG).