Both, plus the captive advertising revenue stream. If you can push ads during the laundry app, or do tie-ins where a given detergent enables some bullshit feature...
Replying to myself here. I just found myself shopping for a washer and dryer, and indeed, ran across one that takes manufacturer-branded detergent cartridges and offers to order more, right in the app, when they run low.
It can use third-party detergent by manually adding it at the start of the cycle, but adding some _during_ the cycle (which ultimately uses less) is only supported if using their cartridge.