I an getting confused between enthalpy and internal energy. My textbook says that change in enthalpy is the sum of change in internal energy and the amount of work done in expansion or compression but isn't it the same as the amount of heat lost or given. So why do we need enthalpy?
The internal energy $U$ is the sum of all the energies stored in the chemical bonds. If a chemical reaction happens, the bonds are losing or getting energy. Heat is getting in or out of the system, and this heat $\Delta Q$ can be measured. $\Delta U$ =$\Delta Q$, if the volume is constant. But if the transformation is carried out in contact with the atmosphere, at constant pressure, the volume may change. A fraction of this energy is converted into work $\Delta w$ to repel the atmosphere, because the volume of the system may change. Usually this volume change is small (except if a gas is produced or consumed). And this volume change may be difficult to know with precision. But it must be taken into account to calculate $\Delta U$. So if this small amount of work is neglected, a correction must be added to the internal energy $U$, that depends on pressure and volume. Neglecting this volume correction gives a sort of “apparent internal energy”, which is called enthalpy $H$, with $H = U + PV$. And then, in all transformations made at ordinary pressure, the following expression is valid : $\Delta H$ = $\Delta Q_p $.
Enthalpy is a sort of "apparent internal energy". There is a similar difference between the weight and the "apparent weight", which is measured in air. The weight of an object should be measured in a vacuum. The weight, as measured with a dynamometer in the usual atmosphere, is a little bit smaller than in a vacuum, because of Archimedes.