Mutual integrability, quadratic algebras, and dynamical symmetry