The development of the Standard Model is a paradigmatic example for how models and theories are built in a close "interaction" between empirical findings/accurate measurements and theoretical insights. The Standard Model looks the way it looks, because of the empirical findings and the mathematical necessities of a consistent relativistic quantum field theory involving vector bosons.
Historically it all started of course with Maxwell's electrodynamics. The electromagnetic field is nothing else than a massless vector field, and the famous work by Wigner on the unitary (ray) representations of the proper orthochronous Poincare group tells us that a massless vector field necessarily must be described as a gauge field, if you don't want particles with very strange continuous intrinsic degrees of freedom.
Another important historical landmark is Pauli's conjecture of the existence of a neutrino to "save" energy-momentum conservation in ##\beta## decay and Fermi's quantum field theory of the weak interaction.
In 1948 the work of Feynman, Schwinger, and Tomonaga on QED lead to renormalization theory, overcoming the problem of divergent contributions in the perturbative calculation of the S-matrix, leading to a successful description of the anomalous magnetic moment of the electron and the Lamb shift of the hydron energies.
Then in 1956 Yang and Mills came to the great idea to generalize the concept Abelian gauge invariance to non-Abelian gauge theory. This was a purely (and beautiful) mathemtical insight at the time without direct application.
A bit later in an attempt to bring order into the plethora of new hadrons found in acclerator experiments, Gell-Mann and Zweig found an ordering scheme based on the conjecture of quarks, which after the discovery of Bjorken scaling at SLAC and Feynman's naive parton model were considered as really existing "particles", which however were always confined in hadrons.
From the QFT point of view both the weak and the strong interaction were pretty challenging since to have short-range interactions a naive description with massless vector bosons as "charge carriers" seemed not to work, but on the other hand massive vector bosons made trouble with renormalizability, and that was also the case with Fermi's four-fermion point-couplings to describe the weak interaction.
Famously then Ward, Glashow, Salam, and Weinberg came up with a theory of the weak interaction using the discovery by Higgs, Kibble, Brout, Englert, Hagen,... (based on Anderson's discovery in QED used in the theory of superconductivity a la Bardeen, Cooper, and Shriever) that you can come up with a non-Abelian gauge theory that doesn't loose its gauge invariance when giving the vector gauge bosons mass by the Higgs mechanism, i.e., coupling the vector bosons minimally to an appropriate set of scalar fields and then trying to spontaneously break the local gauge theory. As has been understood shortly thereafter in the case of a local gauge symmetry you cannot break the symmetry spontaneously and no massless Nambu-Goldstone modes occur in the physical spetrum (as necessarily it must happen when breaking a global continuous symmetry spontaneously). In the case of the weak interaction, according to Glashow, Salam, and Weinberg you hat to combine a chiral weak-isospin symmetry based on the group SU(2) with an Abelian U(1) hypercharge symmetry and then "Higgsing" the corresponding local symmetry such that ##\mathrm{SU}(2)_{\text{wiso}} \times \mathrm{U}(1)_{\text{wY}}## get's "broken" to ##\mathrm{U}(1)_{\text{em}}##. But as one had learned then the symmetry is not spontaneously broken but rather the "would-be-Nambu-Goldstone modes" provide the additional polarization degrees of freedom to make three of the four gauge bosons massive, these being the ##\text{W}^{\pm}## and ##\text{Z}^0## bosons and keeping a fourth one massless, which then describes the photon, i.e., the electromagnetic field.
Then the question was, whether non-Abelian gauge theories are renormalizable or not and if so, whether also "Higgsed" non-Abelian gauge theories with massive gauge bosons stay renormalizable. This has been answered in the positive by Veltman and 't Hooft in 't Hooft's PHD thesis (1971).
Then in 1973 Politzer as well as Wilczek and Gross in their renormalization-group analysis of non-Abelian gauge theories discovered asymptotic freedom and opened the door to also describe the strong interaction between quarks by a non-Abelian gauge theory based on a new local gauge symmetry called "color SU(3)". The asymptotic freedom means that the "running coupling" of this Quantum chromodynamics (QCD) becomes small at high energies and strong at low energies, implying that perturbation theory cannot be used at low energies but giving hope that this might explain confinement, i.e., the fact that neither quarks nor gluons (the massless gauge bosons of the strong interaction) have ever been observed as free particles. Confinement, of course, is a non-perturbative phenomenon and till today there's no full analytical explanation for confinement from QCD, but lattice calculations with their successful prediction of the hadron spectrum (both mesons and baryons and also some more exotic bound states) indicates that QCD provides confinement and is the correct theory of the strong interactions.
Another beautiful finding is that with the full quark content (2 "flavors" in each family, each quark having 3 color degrees of freedom according to the fundamental representation of the color SU(3) gauge group) and lepton content (a charged lepton + its neutrino in each family) the explicit breaking of the chiral gauge symmetry underlying the electroweak sector of the standard model through anomalies doesn't occur, keeping the theory consistent.
This is of course a picture far from being complete. One cannot do justice to the fascinating history of the discovery of the Standard Model including also all the important experimental work needed to formulate it in a newgroup posting. For a very good (semi-popular) account of this story, I recommend
Frank Close, The Infinity Puzzle, Basic Books, NY (2011)
It's really a page turner.
Now whenever physicists start to tell the history of a subject, it's because they have not yet found a deeper reason to argue, why a theory must look as it looks. As all successful physical theories also the Standard Model is based on an interplay of theory and experiment and the theory is formulated based on mathematical reasoning on the one hand but also and foremost on the observations it is supposed to describe. Though the symmetry principles underlying its formulation are pretty constraining on the one hand they are also flexible enough to build many theories. So these symmetry principles do not answer why Nature is observed to behave in the very way the Standard Model describes it (up to today very successfully to the dismay of all the physicists looking for physics "beyond the Standard Model" to find a possible explanations of unsolved problems like the question, whether there are more elementary particles which might be candidates for dark matter and to give hints how to find them or the famous "strong CP problem" (axions?)).
The Standard Model cannot explain why the Standard Model contains precisely the elementary particles it does, why there are 3 families (with light neutrinos) nor why the free constants of the model (19 if I remember right in the plain Standard Model und about 25 if neutrino masses and the (observed) neutrino mixing are taken into account in an extension of the Standard Model) take the values they do (and thus providing the current masses of the particles in the standard model via the Higgs mechanism with confinement however giving about 98% of the hadron masses in the light-quark sector, including the matter surrounding us, which consists of bound states the lightest u- and d-quarks as well as electrons, i.e., the particles of the 1st family).
Maybe these questions are anwered one day when a better theory is found.