The private company's owners take the majority of the shares and usually change the name and ticker-symbol, so the listing survives but the business is entirely new. It is faster and cheaper than an ipo and avoids the underwriter and roadshow process.
It also skips the diligence that comes with underwriting. Reverse mergers have a long history of fraud, and exchanges impose seasoning requirements before an uplisting is allowed. A de-spac is a structured, better-disclosed cousin of the same idea.
Example: a private company with a $400M valuation merges into a shell with 5M shares. It issues 95M new shares to its owners, who end with 95% of a 100M share company; the shell's holders keep 5%.
Related: shell-company