Here's an excerpt from Schwartz's QFT text, section 8.2.2, that's always totally confused me.
A natural guess for the Lagrangian of a spin 1 field is $$\mathcal{L} = - \frac12 \partial_\nu A_\mu \partial_\nu A_\mu + \frac12 m^2 A_\mu A_\mu.\tag{8.17}$$ Then the equations of motion are $$(\Box + m^2) A_\mu = 0.\tag{8.18}$$ In fact, this Lagrangian is not the Lagrangian for a massive spin-1 field, but the Lagrangian for four massive scalar fields, $A_0$ through $A_3$. You might wonder how we know if $A_\mu$ transforms as a vector or four scalars. As a very general statement, we do not get to impose symmetries on a theory. We just pick the Lagrangian, and let the theory go.
I find this passage incredibly confusing. First, how is it apparent that there are four massive scalar fields, when it looks like the equation of motion works either way?
Second, Schwartz seems to be saying that the Lagrangian determines how the fields inside it transform, which seems exactly backward to me. Don't we first postulate that fields exists with certain transformation properties, then write down scalar Lagrangians for them? That's exactly how we construct the Dirac spinor, for instance -- we write down how it transforms, and only afterward write down the Dirac Lagrangian.