Of course it's a direct competitor to Playstation. It's the reason why Sony launched a PS4 Pro, for example.
Microsoft hasn't learn anything of the sort. What they have learned, finally, is that PC gamers game on windows and it's stupid as fuck not to try and turn PC into an extension of Xbox. That way they can sell services like gamepass on PC and boost their Xbox live numbers too. And they learned this with the Xbox one, I wonder why? Maybe because they sold a lot less hardware than they predicted and Gamepass needs to increase subcription numbers quickly?
Microsoft isn't simply porting games for PC, there's a lot more behind it.