Assuming links work here, a couple good articles:
In short, everyone wants a piece of the ecosystem game. Some is poorly thought out (Leap Motion is doing it badly) but for the core concept I refer you to Motorola's mobile phone business. Several times they have been the absolute dominant force in the industry. But, when you sell consumer hardware only, busts can follow booms. And did for them, many times.
An ecosystem means ongoing revenue, not just periodic hardware sales. It means secondary market sales are the same to you, as the ongoing revenue is what you want, and it means increased stickiness. Apple lives by this, and embraces their customers being stuck on their products.
There is almost no such thing as an apples-to-apples comparison consumers can make when the get used to your ecosystems. Perceived or actual switching costs muddy the waters for them, so you have them longer. Xiaomi is getting this sort of loyalty.
There's other interesting issues having to do with their market. Play store, for example, is not really a thing in China. I can go on and on about this, so ask me if you have additional questions.