A Hamiltonian vector field in a symplectic manifold is the analog of a gradient vector field in Riemannian manifold.
A simple computation using Cartan's magic formula shows that a Hamiltonian vector field preserves the symplectic structure, equivalently its flow acts by symplectomorphisms. However it is not the case that a gradient flow preserves the Riemannian metric, even for a Euclidean metric.
Why does it work in one case and not the other? I mean, I understand the computations, but is there any insight that can be given?