What is the purpose of reflux in chemistry? Watch
This has a few benefits, firstly it helps prevent a fire hazard. You usually in most syntheses are using a flammable solvent you don't want the vapours of that to escape and risk catching on fire. It also means that you can have a setup in which a reaction can progress for several days. It's common practice in research laboratories to leave a reaction mixture 'refluxing' for several days in order to obtain a high yield.