How do Sharks make money on Shark Tank through equity alone? When the Sharks on Shark Tank buy equity in private companies, how do they eventually make money by purchasing only equity?  

For example, if the company makes a lot of money for a few years but then goes out of business, does the Shark lose all of their money if they don't sell their equity share to another private investor before the company goes out of business even if the company was very profitable for a few years?
Getting cash out is no different for sharks on Shark Tank than any other investors in private equity: they can make money back from dividends that are yielded by profits; or by selling on the shares to someone else; or by asset-stripping the companies - i.e. selling off their assets, and closing down the trading activities of the company.

As with most other equity investors, they own shares in a mix of companies. So to make money overall, they don't need to make money on every single company. They can accept that some will do badly (often losing them their whole investment), and some will do well, but overall, they expect to make a profit on the portfolio.

Indeed, in general, for investing in small companies with private equity, the expectation might normally be that most investments will yield the investor a 100% loss, but the few that do make a profit, make such a big profit that the overall bottom line is positive.

However, the sharks do have the huge advantage that every one of their companies has received significant free tv advertising, and has had the public endorsement of a supposed "smart" investor, which tilts the odds in their favour.