for the first law of thermodynamics ($\DeltaU=Q-W$), if there is not variation of internal energy ($\DeltaU=0$),$Q=W$, so, if there is an expansion ($W>0$), the gas must absorb some heat ($Q>0$) Here is an extra idea: Imagine an ideal gas inside a semi-open container, with a piston on the open side. Suppose the gas expands isothermally, pushing the piston. If this happened without applying heat, the speed of the molecules would decrease, because those molecules that collide with the piston lose linear momentum: $p_1<p_0$ (the molecule rebounds with less momentum since it transfers energy to the piston). Remember that in the ideal gas model, collisions between molecules are neglected. As the speed decreases, the average kinetic energy also decreases, and therefore the temperature would drop, since $\bar{E}_c>=\frac{3kT}{2}. Thus, the expansion would no longer be isothermal. This is why heat must be supplied to compensate for the energy lost as work