Windows is the part that they use to leverage their sales of Office which is Microsofts main cash cow.
With Windows no longer being able to to give Office an extra advantage, Office will have a hard time to compete and will no longer be dominating and it will be really downhill for Microsoft.
Its all about follow the money. A company in trouble usually sell off the parts of their business that dont show a big profit.
Selling the cash cow means you are left with a business that hardly gives any profit for the future. That is a bad bet for a company that aim to survive. Selling Xbox is thus the better choice for the company. Its just sound business strategy.