Energy is power * time, and power is voltage * current. As long as the current is near zero, the power will be relatively low and therefore the energy will be relatively low.
Your USB hub either has a transformer that converts 120V AC down to 7-10V AC before rectifying, filtering and regulating the voltage down to 5V (that would be an old one), or it has a switching converter that accomplishes the same thing in a more efficient manner.
The transformer does always draw some current at idle, however most of the current draw is in proportion to the current used on the secondary side (which would be close to zero with nothing plugged into the USB port). Traditional transformer power supplies are less efficient, both at idle and under load, and they are bulky and heavy so they are less common now.
Modern switching converters have special circuitry to minimize power consumption when there is no load. To oversimplify, they directly rectify the 120V AC to DC, then use a fast semiconductor switch (usually a MOSFET or IGBT) to drive a small transformer at high frequency (the size of the transformer varies inversely with operating frequency for a given power transfer) using pulses of current. The output is filtered using a capacitor which stores some power (charge). If there no load, the controller detects that the capacitor is still close to the target output voltage of 5V and skips sending pulses to the transformer. It provides additional pulses of power to charge the capacitor when capacitor and misc circuit leakage discharges it down below a threshold, or when you plug something in and discharge the power stored in the capacitor into your device. It then provides a single pulse or continuous stream of pulses of power to the transformer to maintain the output voltage as required.