The acquisition of Nokia's device business by Microsoft makes sense economically, but it might not do much to help Microsoft compete with the dominant players in the smartphone market.
The economic case for the merger is rather straightforward. Both Microsoft and Nokia were rapidly developing a dangerous relationship that left each of them vulnerable to mistakes and predatory behavior by the other. As the dominant seller of phones using the Microsoft operating system, Nokia was in a position to exploit Microsoft. What's more, Microsoft was vulnerable to Nokia's failures. If Nokia's devices lag behind the devices using Android or the iPhone, Microsoft would likely lose market share.
The relationship wasn't great for Nokia either. It couldn't afford to become too dependent on Microsoft, for fear that Microsoft might abandon the market altogether or just produce software too inferior to attract customers. This meant that Nokia research and development work had to remain somewhat agnostic when it came to operating systems, which means that the hardware and software were unlikely to ever work as well as they do on an iPhone.
The merger should go a long way to solve some of these problems. The devices can be narrowly tailored to and optimized for a Microsoft operating system. Expensive precautions against opportunistic behavior can be shed. Mutual fear of exploitation gets replaced by genuine team effort.