I have several answers on this site detailing the issue, but it is too hard for me to collect them all. Your source might be this mini-crib-sheet.
In a nutshell, as any half-decent QFT course should hammer in, again, and again, is that kinetic and gauge-boson coupling terms preserve chirality, but mass and Yukawa couplings to scalars do not. This is a generic property of the Lorentz group. Mathematically, kinetic and gauge couplings do not couple $\psi_L$ to $\psi_R$, but mass terms and Yukawa terms do. So mass terms must be there, even though, before 1968, physicists knew quite firmly that the weak interactions they had seen so far only involved $\psi_L$s, and not $\psi_R$s (the Feynman--Gell-Mann theory).
This was a major snag, since the fermion mass terms would
prevent a correct theory from being fully (su(2)-) chirally invariant (unchanged under a chiral transformation that leaves $\psi_R$s alone while transforming only $\psi_L$s), and, for technical reasons, would make such a gauge theory inconsistent. Lack of gauge theory would then mean ferocious mixings of energy scales upon renormalization, and complete computational failure of such a bad theory.
- So, the major existential snag for such theories was the non-invariance of all mass terms, such as $m\overline{\psi_R}\psi_L$. This is your fundamental reason.
In 1968, Weinberg (and Salam) broke the logjam. They utilized the fact that a hypothetical scalar, the Higgs field, which could give gauge bosons an effective mass upon SSB, could also solve the above problem. In more detail, among other complicating factors, if the gauge group contained an su(2) acting only on left fermions and a complex Higgs doublet field, then terms such as
$$
g_Y ~\overline{\psi_L}\cdot \phi ~~e_R + \hbox{h.c.} ,\\
\psi_L\equiv \begin{pmatrix} \nu_L\\ e_L \end{pmatrix}, ~~~~~~ \phi \equiv \begin{pmatrix} \phi^+\\ \phi^0 \end{pmatrix}
$$
would be invariant under Left su(2), as the leading dot product is an invariant.
Finally, upon SSB, preserving the symmetry but changing its realization, would allow shifting $\phi^0$ by a constant $v\equiv \langle \phi^0\rangle$, and thus inducing a mass term for the electron with $m=g_Y v$.
So mass terms are compatible with chiral Weak Interactions, after all, and save the existence of the gauge theory. They are the linchpin. They have absolutely nothing to do with the Higgs mechanism (only involved in the gauge bosons getting a mass) and are a consequence of just SSB. The Higgs particle's mass also gets its mass in that process (SSB), but in a very different way.
I have been cavalier with normalization factors, weak hypercharge, and the full group, as opposed to the Lie algebra, to steer away from logical distractions. If you want further technical details, I could add a mini appendix.
Actually, the idea was not quite Weinberg's, as it had been triumphantly introduced by Gell-Mann and Levy in 1964 (with an important nudge by Feynman) in their celebrated 1964 σ-model paper, finally explaining nucleon masses in strong-interactions' chiral symmetry breaking. (If your teacher failed to introduce this before the SM, that's the root or your problem right there!) Both Weinberg and Salam were σ-model experts, so this ingredient was not as exotic to them as the then hypothetical Higgs mechanism...