In today's world, almost every person owns a cellphone and the majority of them are smartphones.
The factor that differentiates between a regular phone and a smartphone is the operating system. There have many operating systems throughout the millennium with different degrees of success and popularity. However, only two operating systems dominate the world which are Android and IOS.
No phone makers can survive in today's world without utilising either of these two ecosystems. There have been multiple and noteworthy attempts in the past few years as well such as Blackberry 10 or Microsoft's Windows phone but both of them failed and virtually disappeared and both companies turned to Android.
Android and IOS have some fundamental licensing differences which have an enormous impact on the financial situation of the companies who use them. Android is an open source platform maintained by Google which any company can use in its stock form or with as much modification as it can make. IOS, on the other hand, belongs Apple who uses it exclusively, has never allowed anyone else to use it and Obviously, is not going to give that permission to any company any time soon. As the result, there are hundreds of companies which manufacture Android devices and only one company which manufacture IOS devices.
Android comprises 87% of the smartphone market share and IOS accounts for 12.5% of the market share. Yet, most of the Android makers do not make any money while Apple is the largest company in the world by market capitalisation and large portion of its profits come from IOS devices. There are a few key reasons that Android phone makers (in general) struggle financially while Apple keeps striving.
The first reason that Apple makes a lot of money out of IOS is the brand it has managed to create. Out of those people who are willing to pay (or able to pay) the premium price for a phone or tablet, many prefer IOS devices because they consider it to be the best and most prestigious (even if they don't admit it.) However, other mainstream brands do not have the same prestige as iPhone or iPad.
As the result, Apple charge the premium price for its IOS devices while many other brands are not able to do so.
IOS has its own ecosystem and once a user invest a lot of time, data and money into the system, it would be hard to switch. Apple, almost does not provide any service for those owning an Android phone. So, if someone, after years of using Apple's services, decides to switch to Android, he or she will have tough time. However, it is an easier task in reverse. Almost all the necessary services of Google are compatible to IOS. This fact has created a group of loyal users for the IOS.
IOS has a lot of loyal users and if you want to use IOS, you have to buy an Apple device, at its premium price, and play by its rules. But, this story is not so simple for Android makers. Even if someone decides to buy an Android phone, there are many many different brands who have to compete to convince the customers to buy their phones. They have to add more features for a lesser price and spend a lot of money on the marketing. These costs, along with the tight competition can erase the profits of many companies, almost entirely.
Despite the previous facts, Android, after all, has 87% of the market share. So why Apple is the largest company in the world while Android makers are so miserable? The answer lies in the exclusivity.
You see, Apple owns the phone and the operating system behind it. You pay 700-1000$ for an iPhone, out of which, few hundred bucks are the profits. However, Apple's profit does not stop there. Apple sells you chargers, dongles and many other accessories. It also takes 30% of every single purchase you make on iTunes, iBooks or App Store. Oh, and those who make and upload those contents need MacBooks to be able to do so. Apple sells you a phone and makes money out of you for as long as you use the product.
However, the situation is a bit different for Android makers. Once you buy the phone, the manufacturer can't make any money out of you. If you make a purchase on the Play store, the manufacturer does not see a dime of it (unless the manufacturer is Google.) They can make some money by selling the accessories but statistically, nobody buys their rather expensive products while there are many cheaper alternatives. And finally, when you decide to get a new phone, there is a very high chance that you chose a different brand.
So, even though some Android makers might make some profits, most of them don't while Apple, continues to dominate the world with IOS.