No, its a consequence of increased security and the inconvenience of have to sign out and create a new account when reselling the phone was an acceptable compromise, rather than an intended ‘bonus’ side effect. A lot of times companies do do that, but this wasn’t one off them.
This was your friend’s fault, and yours to trade cash before understanding how the system worked.
I would recommend Shopifys APIs. Theres a lot to them, they’re well documented, and you can build a developers store for free.
Adobe commerce is another one. You can get a dockerized store up and running pretty quickly, also free and their documentation includes some basic suggested workflows.
Edit: these are mostly for practicing consuming apis, not sure if thats what you were looking for.