In some sense, describing the strong force using an $SU(3)$ Yang-Mills theory makes perfect sense: Yang-Mills theories describe massless bosons, of which the gluon is clearly a member, while the two most common hadrons were observed (in deep inelastic scattering) to consist of three components, motivating an $SU(3)$ symmetry for the associated interaction. What confuses me is why the weak force would be thought to be described by such a theory, given that it's governed by massive bosons. Clearly, if one wants to unify electromagnetism and the weak interaction, a gauge theory of some sort is needed, and we can of course describe how a massive boson could arise due to spontaneous symmetry breaking from such a theory. But unless one was specifically trying to unify these two interactions, is there a specific reason a Yang-Mills theory would be attempted? (And if the answer is that the Yang-Mills formulation arose from an attempted unification—what was the motivation for suspecting the weak and electromagnetic forces could be unified, rather than any other two?)
Put more simply, my question is this: Electromagnetism and the strong interaction are both mediated by massless particles, which require a gauge-invariant interaction term (and therefore require the fermions to have a symmetry under some Lie group). Massive particles don't require gauge-invariant interaction terms (since they don't undergo gauge transformations) and therefore don't need to couple to fermions with such a symmetry. So is there any good reason for thinking that massive bosons also are governed by a gauge theory, despite not having a gauge in the traditional sense?