The power profiles include a maximum current. If the device exceeds the current draw for the chosen profile, the power supply cuts the power.
The wikipedia article might be more accessible than the spec: https://en.wikipedia.org/wiki/USB_hardware#USB_Power_Deliver...