mAh is not a unit of power, it is a unit of charge. It is an abbreviation for milli-amp-hours.
mA is also not a unit of power, but of current. It is an abbreviation for milli-amps.
mW is a unit of power, i.e. milliwatts.
If you have a device supplied by a fixed voltage, and know the current drawn by the device, you can calculate the power drawn by a device, using this formula
$$P = VI$$
where \$P\$ is the power, \$I\$ is the current, and \$V\$ is the voltage applied to the device.
That is the case for your ESP32 and the table in question. The table is based on the assumption that the ESP32 is powered by a 3.3V supply.
If you have a load with a fixed. a fixed resistance, then one can find the power (i.e. mW) from the current using the formula
$$P=I^2 R$$
This is not the case for your ESP32, but this formula is useful in many other cases.