The chain rule for functionals is used to reduce the noncanonical Poisson bracket for magnetohydrodynamics (MHD) to one for axisymmetric and translationally symmetric MHD and hydrodynamics. The procedure for obtaining Casimir invariants from noncanonical Poisson brackets is reviewed and then used to obtain the Casimir invariants for the considered symmetrical theories. It is shown why extrema of the energy plus Casimir invariants correspond to equilibria, thereby giving an explanation for the ad hoc variational principles that have existed in plasma physics. Variational principles for general equilibria are obtained in this way.