There's no mystery as to why LinkedIn (LNKD.DL) shares spiked in June. The company agreed to a deal in which Microsoft (MSFT -1.96%) would acquire it for $26.2 billion, or $196 per share, a roughly 50% premium on the company's stock price before the sale.

What: The social site, which calls itself the world's largest professional network, announced the deal on June 13. Before that, the company had closed May at $136.50 a share, spiking on news of the acquisition, before closing the month at $189.25, a 38.64% gain, according to data provided by S&P Global Market Intelligence.

Image source:

So what: LinkedIn was sold at a premium, in part because the company was not in a position where it needed a buyer. The social-media site had been growing, and owned a niche -- interactions based around work and careers -- that it had, more or less, to itself. Microsoft intends to respect that by allowing the company to continue to operate independently under existing CEO Jeff Weiner, who will report to Microsoft boss Satya Nadella.

Image Source: LinkedIn.

"The LinkedIn team has grown a fantastic business centered on connecting the world's professionals," Nadella said in a press release. "Together we can accelerate the growth of LinkedIn, as well as Microsoft Office 365 and Dynamics as we seek to empower every person and organization on the planet."

Now what: Both companies' boards of directors have already approved the deal, which is unlikely to face any regulatory hurdles. Once the deal is approved, Microsoft plans to integrate LinkedIn into many of its products, including the aforementioned Office.

Weiner elaborates on the deal:

Just as we have changed the way the world connects to opportunity, this relationship with Microsoft, and the combination of their cloud and LinkedIn's network, now gives us a chance to also change the way the world works. For the last 13 years, we've been uniquely positioned to connect professionals to make them more productive and successful, and I'm looking forward to leading our team through the next chapter of our story.

It's hard to see anything stopping this deal from happening, so Weiner should get his chance to do exactly that.