Did MS break any laws here? No. Did MS break the license of the software? No. It's licensed under the BSD-license, and it allows anyone to do anything they want with the code.
That said, I have a problem with the BSD-license for this particular reason. MS can take the hard work of others and use it in their products, without giving anything back to the community. With GPL, that is not possible. No, I'm not some GPL-zealot trying to force everybody to use it. But there are times when GPL is more suitable.
The reason why MS said that they like the BSD-license and hate the GPL is precisely because of this. MS can do whatever they please with BSD-licensed code, but they can't do that with GPL-licensed code. They can "steal" BSD-code, but not GPL-code. And that's why they whine. They have gone as far as calling GPL-license "un-american", "communist" and "cancer".