The assumption that a USB-A to USB-C cable is limited to 5 volts at 0.5 amps doesn't hold if someone were to dig up the old USB-PD 1.0 specification. In USB-PD 1.0 there was a method to negotiate up to 20 volts and 5 amps from USB-A. In USB-PD 1.0 the power negotiation would happen by low speed serial communication on the Vbus and Gnd pins. I don't recall seeing any products that implemented this protocol and it was soon replaced by USB-PD 2.0, then USB-PD 3.0, and USB-PD is now at version 3.1. On top of this were a number of competing protocols that negotiate power on USB-A ports using methods that might not comply with the USB specifications but are popular regardless.
Even under the different USB specification documents there's ways to get more than 5 volts at 0.5 amps from USB-A. The "default" power option is one of three options, the other two are 1.5 amps and 3.0 amps. I don't recall how all the pieces fit among all the different USB specifications so I'm open to corrections. The 1.5 amp power option likely comes from USB-BC, perhaps also from the USB 3.0 spec. Under USB 3.0 the 900 mA power rating is not a maximum but a minimum, a USB 3.0 host must be able to supply at least 900 mA to meet the spec with options for up to 1.5 or 3.0 amps. Adapters and cables for USB 3.0 will have the resistors in them to indicate to the host what level of power they are rated for, then the host will negotiate allowed power supplied to devices based on the weakest link.
Not all cables with USB connectors will follow the USB specifications, they may use some third party spec to indicate how much power the cable is able to handle. One popular specification for this is QuickCharge, or QC. With USB-PD gaining popularity the QC spec has evolved to incorporate backward compatibility with USB-PD so the distinction between the two is fading. Older QC cables, and compatible USB-A ports on computers and chargers, would use the USB D+/- pins to negotiate power which limited the compatibility with USB 2.0 and USB 3.0. QC charging cables might not pass data (at least not on the D+/- data pins), and by not passing data the cables would be incompatible with many USB devices.
Under USB 2.0, USB 3.x, and USB-BC the negotiation of the power would happen on the D+/- pins, but in a different way than QC and other protocols. USB 2.0 allows for power at 5 volts up to 1.5 amps, or so it appears with some of the USB 2.0 devices I have around. USB-BC allows for 5 volts and up to 2.4 amps on USB-A, something that other protocols allow for also such as Apple's BrickID protocol. USB 3.x allows for negotiation for 5 volts at up to 3.0 amps on USB-A. I recall USB-PD negotiating power by the Vbus and Gnd pins on USB-A, and the CC pins on USB-C, but there may be a means to negotiate power on the data pins in addition to carrying USB data on both types of ports.
How does the cable indicate to the host that supplies power how much power it can handle? Depending on the protocol it is in the spec that the cable must meet minimums on voltage and current, or this is communicated by electronics in the cable. I've seen cables that use QC to negotiate power on its USB-A connector and USB-PD on its USB-C connector. Such cables are more of a peripheral that performs protocol translation than a cable.
Any USB-C to USB-C cable that is built for more than 3 amps must have a circuit inside the connector to indicate to the connected devices the allowed current and voltage. USB-PD 3.1 allows for up to 48 volts at 5 amps, prior to that USB-PD was limited to 20 volts at 5 amps. Because of how the different USB specifications intertwine I'm confused on if this should be considered part of the USB-PD spec, the USB-C spec, some other spec, or all the above.