When Google chose to open the Android OS, it created a marketplace for Android devices which it attempted to control by the use of anticompetitive contracts and actions.
The parallels with Microsoft and Windows are obvious. Microsoft has been found guilty of anticompetitive actions in the Windows PC marketplace it created by opening up Windows.
Yet Microsoft also has the XBox, which it did not open up to other hardware makers and which is just as much of a walled garden as iOS.
There have been no legal ramifications of Microsoft choosing to be the sole maker it's own product, nor of having it's product be a walled garden.
It's not illegal to have a monopoly over your own product and it's not illegal to have a walled garden.