At around the time this was being written, Huawei, one of the biggest smartphone manufacturers in the world (number two, right behind Samsung) was launching its flagship Mate 20 Pro smartphone. Yes, it had all the bells and whistles that you would expect from a high-end device, but the feature that was most highlighted and that caught most people's attention was the presence of three cameras at the back. Not too long before that, Samsung had launched the Galaxy A9, which had four cameras on its rear. And there is already talk of LG working on a phone that has a mind numbing sixteen (!) cameras. That's really a lot of cameras when you consider that less than half a decade ago, a single camera on the back was deemed to be more than enough.
What then do all these extra cameras on your phone do? Well, the optimists would say that they bring your phone closer to a DSLR, while the cynics would say that they are more about marketing and point out that a DSLR itself only uses a single lens. The truth is, as always, somewhere between those two extremes. While it is still a single camera among the array that does most of the work (it is often referred to as the "main" camera and has the largest aperture and sensor size), the other cameras do not exist only for driving up prices or for hype - they do add some value to the whole photography experience. Some of the most notable features that they enable are:
Deliver bokeh (portrait mode)
Perhaps the most popular use for a second (and sometimes even a third camera) is collect information that will allow the phone to add "bokeh" to a photograph, or shoot in "portrait mode" - these cameras are sometimes also referred to as depth sensors. In simple non-tech terms and without going into discussions of "depth of field", this means keep the subject in sharp focus, while blurring out the background. And not just blurring it, but even doing to artistically, turning lights into small spheres, for instance. Ironically, however, no phone camera ever seems to have really been able to deliver portraits that are as clearly defined as on DSLRs and even point and shoot cameras. Perhaps that is why Google has opted to take the software route in its Pixel range of cameras, relying on software rather than another camera to get information about the subject and its background.
Offer optical/lossless zoom
Some secondary cameras also offer "optical zoom," or the ability to get closer to your subject without moving or compromising image quality. Apple offers this option in a number of its recent iPhones. The zoom can either involve actual slight movement by the lens (it can only move to a very limited extent given the size of a phone) or just combining with the main camera to take a very high resolution shot and then letting users zoom into areas by cropping the shot, and still not losing detail (a concept some manufacturers call "lossless zoom"). The amount of zoom offered is limited - generally in the region of 2x-3x, but when compared with absolutely none on a regular phone camera, that can make a difference. In many cases, the telephoto camera is also used for better portraits as it can sense distance better than a normal depth sensor.
Shoot in black and white (and deliver better low light results too)
A few phones come with a secondary camera that is actually a monochrome (black and white) one. The most notable in this series are Huawei's P series of devices which had a monochrome sensor from Leica. These cameras not only let you switch from using a "regular" color (also called RGB) camera to a black and white one, evoking a sense of nostalgia without compromising on quality (using black and white filters is never quite as good), but they also enabled better low light photography, as a high quality monochrome sensor often captured more details in low light conditions and with lesser noise. The detail rich, relatively noise free monochrome camera image would then be blended with the "normal" coloured one to deliver a single snap that would have more detail than you would get from a single camera.
Offer a wider perspective
Just as some companies go for a second camera to get more zoom, enabling you to get closer to your subject without moving, some others (LG most notably) use the second camera to offer you a wider perspective. The secondary camera in their case has a wider angled lens, making it perfect for those people who want to shoot landscapes or natural wonders. In many cases, the phone lets you switch between a normal view and a widescreen view while in some, you simply get a combined "wider" view.
Create special effects
Depth sensing cameras can enable you to add bokeh to your images, but the depth information (the distance between the subject and the background, the outline of the subject and so on) is also being used for a number of special effects. Perhaps the most notable of these is Portrait Lighting by Apple on the iPhone, which uses the information collected by the second camera to actually simulate different lighting effects. There are other devices which use the same information for other effects like changing the background and replacing it with something on another picture.
Simply get more detail
In some cases, the role of the second camera (especially if it has a relatively high megapixel count - anything above 8) is also to collect additional detail and information and simply combine with the main camera to deliver a picture that has far more detail than a single camera would capture. Call it a sort of super HDR if you will. A number of dual camera devices used to do this initially but of late, with main camera sensors getting better, this functionality is becoming less popular.