Microsoft wanted a foothold in the living room. Sony's PlayStation had made console gaming a mass market, and Microsoft judged that the same space would eventually become the centre of digital entertainment, from games to streaming.
The Xbox was also a strategic hedge: it put a Microsoft-controlled platform under the television rather than leaving that territory entirely to competitors.