That's true, they weren't.
Several years before that purchase, Stephen Elop (an MS executive) became CEO of Nokia. Within 6 months of his hire, Nokia signed an agreement with MS to sell Windows Phone devices; the classic Symbian OS and the Linux-based Meego - both of which had shipping hardware - were canceled in favor of exclusive focus on Windows Phone. Within the next few years, Nokia laid off over 20k people, their stock dropped by about 85%, and they even sold and then leased back their HQ in Finland. They were a lot less successful by that point, and a lot less expensive to purchase. Which Microsoft did.
There was some amount of controversy associated with the above.