An additional point that I wanted to state from this source.
The same source has an image which shows the reaction mechanism:

Note the 2nd reaction in the above image.
I quote some relevant text:
Note that the carbocation in this case bears a chloride ion. Since carbocations are electron poor, and chlorine is quite an electronegative element, it’s interesting to point out that the electron releasing ability of the alkyl group [and the ability of chlorine to donate a lone pair to the carbocation] “win out” here over the electron-withdrawing character of chloride ion.
This is the genaralized case while in your case the R=H and it no longers qualifies as an alkyl group. But it is important to note that in the actual pathway, 3 H contribute in the hyperconjugation while in the other pathway , only 2. This effect, combined with the +M of the Cl overpower the -I effect.