IBM (and other big companies) maintain a huge patent portfolio.
Some of the patents are in their products but the vast majority are not.
They use the patents for defensive purposes, among other things.
Whenever a competitor makes an intellectual property claim aginst IBM, IBM uses their own patent portfolio to make counterclaims against the other company, if the claim involves technology for which IBM has existing patents.
Usually both companies negotiate in good faith, and settle the claim by exchanging patent rights. Their purpose is to obtain freedom of action. Sometimes money changes hands; sometimes patent rights change hands with no money involved. Patent litigation is very rare. Negotiation and settlement is the usual course.
IBM (and other large technology companies) also uses their patent portfolio to influence laws and standards, by selectively opening certain patents (making them available to the public at no charge) to make themselves look like the good guy, while simultaneously attempting to influence the course of technology evolution, in a way that gives them competitive advantage by having the product first or having a more complete implementation or having an implementation of the newly "open standard" that also contains proprietary technology.
It's not necessarily sinister; it's just how big companies do business.
So you cannot necessarily read something into IBM selling patents to Facebook. There are multiple reasons on both sides for why this might have occurred.