Why do these USB mobile phone chargers have multiple output ratings?
The one on the right is an older Samsung Adaptive Fast Charger. It communicates on the data pins to allow for the faster 9V charging voltage. Its a proprietary Samsung protocol.
The one on the left is a newer USB C with Power Delivery standard (PD) 3.0 (or newer) with PD 2.0 PDO charging (fixed profiles) and PD 3.0 PPS charging (arbitrary voltages in a range). Communication for selecting the higher voltages are done on the USB C CC lines.
Both require active communication to enable and keep enabled the higher voltages. They default to 5V. The purpose is to allow higher power and more efficient charging by reducing the current over the wire which causes voltage drop and heat. Essentially because backwards compatibility is important for usb.