No. You're confusing sales with profits. The Xbox division lost Microsoft over $3 Billion '03-'12. This has been covered extensively but see eg) http://www.neowin.net/news/report-microsofts-xbox-division-h...
Profit, other than perhaps hope of long-term profit derived from spending their competitors out of business, was certainly not their motivation
IE runs Java applets through a third-party plugin, and Java runs on Windows because the Java guys write and distribute a VM that supports Windows. Microsoft already got itself in very hot water for trying to strongarm people off of its platform entirely (Netscape antitrust case), so they're not about to try that again. You can make software for Windows, but Microsoft is going to use their clout in legally "fair" ways to make sure you don't damage their lock-in. Java was a very serious threat to MS, which is why they created .NET and built an enterprise sales apparatus around it.
Sun lost its way and Microsoft ate up most of the custom enterprise software market with .NET. A pity really; the future could've looked much different if Sun had successfully and aggressively countered .NET. MS made sure it didn't happen because write once, run anywhere meant that Windows wasn't going to be very important anymore. .NET touted similar features, but the catch was they only wrote a VM for MS platforms, incidentally.
Pre-reply: Yes, Mono exists, Microsoft made minor contributions here and there to it, but it is now and always has been a second-class citizen in this space, and Microsoft will ensure that it always will be. It seems Mono typically gets support for an API just as it becomes deprecated and its new big brother starts to emerge on Windows. That's intentional.
Any business' end-goal is profit. With the Xbox, this is through both vendor lock-in and "owning the living room". Some MS exec once also talked about using it as a way to transition the masses of console gamers to PC, but that was probably just a "nice to have" at best.
Wanting to use something as a lock-in tool doesn't make it one. I'm pretty sure Microsoft would prefer Windows phone to be at place 1.
Xbox sales were #1 for years - had to be a profit motive there regardless of software 'lock-in'.
.NET maybe, but Windows Phone? Last place in phone sales. How does that lock anybody into anything?
IE supports Java - no lock-in possible there.
Sometimes companies complete by writing software people want to buy. Microsoft has demonstrably done that, and in a market where they are clearly incapable of locking anybody to anything.