Sony makes a small amount of money from physical Xbox games, even though PlayStation and Xbox are competitors thanks to Blu-ray licensing.
Xbox game discs are manufactured by third-party companies, and producing Blu-ray discs requires technology licensed from Sony and other patent holders.
Sony can thus receive licensing revenue when certain physical Xbox games are produced.
When someone buys a physical Xbox game, Sony indirectly earns a small fee from the disc itself.