Source: Baidu

In February, Baidu (NASDAQ:BIDU) received a proposal to sell its 80.5% stake in video streaming site In an interesting twist, the buyers are Baidu CEO Robin Li and Qiyi CEO Yu Gong. The optics for this type of insider transaction are not great, but it's a good move for the long-term health of Baidu as it allows the company to focus on its most important initiative, online-to-offline (O2O) transactions.

What's Qiyi and who's buying? is a Chinese video streaming service that delivers both original and licensed content. As recently as the third quarter 2015 earnings call, Li was espousing the virtues of the platform, "iQiyi has broken away from the rest of the pack through differentiated content and a unique business handset distribution model. iQiyi is a powerful content distribution platform ..." In 2014, the website was valued between $2 and $3 billion after Xiaomi bought a 10% to 15% stake for $300 million.

Gong has partnered with Li to acquire the whole company at a $2.8 billion enterprise value, which is not far from the valuation it saw a few years ago. Qiyi might be a more valuable property today as, "iQiyi now has the largest number of paying subscribers, with an explosive growth of subscription revenue." It's easy to see why Li and Gong are interested, but are Baidu shareholders getting a fair shake?

Baidu CEO Robin Li. Source: Baidu

Is this a good deal for shareholders?
Baidu shareholders have seen the stock rise over 25% since the buyout proposal was announced on Feb. 12, but the long-term implications from the deal are not quite so clear.

There are indications that Qiyi will eventually be repackaged and go public on a China-based exchange where it might receive a juicier valuation from investors. The optics would be terrible if Baidu received $2.25 billion for its stake, and then a short while later, the company priced at a valuation two or three times that amount. Nevertheless, the deal could still be a good one for Baidu shareholders, because it offers the company two valuable assets: cash and time.

Margins, cash, and time
Qiyi has been a drag on Baidu's margins as the company invests heavily in content acquisition. Bloomberg Business estimates that the negative effect on operating margins in the third quarter of 2015 was 5.4%. The theory is that by removing this anchor, margins will improve, and the overall business will look healthier and more profitable. On an accounting basis, this is true, but it overlooks the immense value that a business can be building even as it is "losing" money in the short-term.

However, investors should be okay with missing out on the long-term potential of Qiyi, because O2O is the most important initiative for the future of Baidu. Robin Li estimates that the market in China alone is $1.6 trillion. It will take time, focus, and lots of capital to capture a significant share of this opportunity, and Baidu's share price had taken a beating, dropping 35% from its 2015 highs as these investments negatively impact short-term results.

Shedding Qiyi will add billions to the balance sheet. According to Moody's, the sale will be "credit positive, because it will lower Baidu's investment and improve its profitability while retaining strategic benefits." This will allow the company to lower the cost of raising new capital should it need to in the future. Investors will be more comfortable letting the O2O journey play out if the company is not pouring cash into other areas such as streaming video.

Baidu currently has a number of subsidiaries that are capital intensive, and O2O is the most important. The sale of Qiyi will allow management to focus more that opportunity, with a larger war chest and a better credit position. Baidu needs to maintain its search dominance in China and capture a piece of this multi-trillion dollar business.

This article represents the opinion of the writer, who may disagree with the “official” recommendation position of a Motley Fool premium advisory service. We’re motley! Questioning an investing thesis -- even one of our own -- helps us all think critically about investing and make decisions that help us become smarter, happier, and richer.