Yes, the owners of company A can sell their shares to profitable company B for an amount between $0 and $210,000. Obviously you wouldn't burn a million to create tax losses.
Remember: this company has $0 in the bank. It's essentially the same as a newly incorporated company, but with tax losses. There would generally be a discount on the value of the tax loss due to historical liability risks of the previous operating business.
The things written above are highly simplified though, and might not give a completely accurate reflection of the situation. There are likely some anti avoidance rules in place to stop this behavior. But this again depends on the country.
Billionaire John Malone (who hates taxes) talks a bit about tax in this business talk at a university: https://youtu.be/v5QfCLeloEg?t=2174.
Also this: https://www.businessinsider.com/what-liberty-really-loves-ab...
"There are some catches here. To use the NOLs (net operating losses), Sirius can't undergo a full change in control for three years. So Malone has to bide his time with his 40% for three years before scarfing up the rest of the company."
This is one such anti avoidance mechanism.
By being smart about taxes, he essentially got that business for free.