It´s not only COD that has M and K support on the Xbox you also have Halo, Roblox, Warframe, Sea of Thieves, Gears, Ark and Fortnite to mention some of the multiplayer games. And also a lot of Sp games. And as many say it works well there. Controlers have aim assist so it evens out, you even have some PC players using controllers instead of keyboards, then why not have mouse and keyboard support on consoles?
Then the matchmaking works a bit different in these games I think, Jackfrags recently made a video about using controllers in COD Warzone, if you matchmake with controller u meet 80% controller users, and if u matchmake with M&K you mett 30% controllers or something like that. He said he also seems to win a lot more games using controller while playing on PC.
And in Halo you can choose to only matchmake with people with the same input or all inputs, and you can´t change inputs during a match to cheat the matchmaking. If you start a match with controller you have to play the entire match with controller until you back out to the menus, the keyboard wont respond to input during gameplay.
And lets not forgett that PC players using controllers are the ones that get the advantage. If you use controller on PC and matchmake with other players using controllers, like console players. You both get aim assist, but the PC player also get more graphical options to get better visibilty, FOW slider wich most console games still dont have, he can also have an ultrawide monitor for even wider FOW, ability to get even higher FPS.