Very simple: you buy hardware and software from different vendors. Each device must have enough information available publicly so that other companies can write software for it.
You might be able to purchase software and hardware at the same time, but there should be a choice of software and the price of the software should be listed separately on the bill.
The prevalent software business model of lock-in has infected hardware. This has disastrous consequences for the environment. Just because some software is unsupported, expensive hardware is bricked.
The parliament recommendation has this to say about this problem: "software solutions which prevent repairs from being performed, other than by approved firms or bodies, should be discouraged".