IBM has made a seemingly odd decision in order to ditch its chipmaking business.

IBM will hand over to GlobalFoundries its semiconductor manufacturing operations, as well as its commercial microelectronics business, for $1.5 billion in cash, paid over three years, the companies announced Monday. However, in an odd twist, GlobalFoundries won't be paying IBM to acquire those operations, but rather IBM will be paying GlobalFoundries to take the business off its hands.

IBM provided some insight into why it made the deal. In an investor statement, the company said that its semiconductor business has "lacked scale" and "has been generating losses." IBM added that as semiconductor development becomes more sophisticated, more costs could pile up. By dumping the business now, IBM asserts that it can "free up capital to be reallocated to other areas."

According to IBM's second-quarter earnings, its microelectronics business saw revenue slide 18 percent from a year earlier.

As part of the deal, GlobalFoundries will become the owner and operator of IBM's existing semiconductor manufacturing plants. IBM will also hand over intellectual property.

GlobalFoundries was created in 2009 when Advanced Micro Devices sold its manufacturing operations to Advanced Technology Investment Co., which is wholly owned by the government of Abu Dhabi, a part of the United Arab Emirates.

GlobalFoundries did not immediately respond to a request for comment.