The most likely reason the Ivory soap expands when heated is:
D. The volume of gas in the spaces of the Ivory soap expands when the temperature increases.
This option accurately describes the phenomenon of expansion due to increased temperature, particularly in relation to gases and the air pockets present in the soap.