Heating under reflux is used to achieve complete oxidation (i.e. in order to achieve a ketone (secondary alcohol) or carboxylicacid (primary alcohol)).
In reflux apparatus, the products of oxidation stay in the reaction mixture. This is because if they do boil off, they will condense in the vertical condenser and return to the heating flask.