For Skype I think it was mostly about rounding out the office suite, MS doesn't want anyone else getting a toehold in workplace collaboration and expanding from there - if you get real classical about it MS Office is the true DNA of the company even more so than Windows/infrastructure. Same reason they bought Yammer and why they were so early on in trying to move on Slack (with the $8B offer that Bill Gates intervened in and shot down).
[Edited slightly for clarity]