Why is alcohol boiled with HBr for preparing alkyl bromide?
Assuming i) a primary alcohol $\ce{R-OH}$ to be converted into the corresponding primary alkyl halogenide $\ce{R-X}$ ii) by $\ce{HX}$ acid only, I would expect a decrease of reactivity to be observed in this line: $\ce{HI} &gt; \ce{HBr} &gt; \ce{HCl} &gt; \ce{HF}$, with $\ce{HF}$ of lowest reactivity.  This is based on the decrease of the nucleophilicity of the anions of these acids.
Of course, halogenations with these four acids are reactions of equilibria, and these may be driven forward by increasing the concentration of the reactants, for example.  And I do recall two-step protocols where the alcohol is activated by sulfuric acid before adding hydrobromic acid.  But in both variants, rather $\ce{H3O+}$ then a neutral $\ce{OH}$ would leave the molecule.
(However secondary and tertiary alcohols that are of higher reactivity than primary ones under these acidic conditions, are more prone to isomerization, too.  Simultaneously, as hinted by ssavec, instead of a mechanism of type $\mathrm{S_{N}1}$, the of  $\mathrm{S_{N}2}$ may become more favorable.)
For the preparation of alkyl chlorides, the addition of (dry) $\ce{ZnCl2}$ in presence of $\ce{HCl}$ is sometimes used.  More easy to handle are routes relying on $\ce{PCl3}$ or $\ce{SOCl2}$, for example.