First of all I stress that the Hamiltonian formulation is not even Galileo covariant in classical mechanics. Also in classical mechanics the energy depends on the reference frame! From this perspective there is no good reason to prefer the Hamiltonian formulation also in classical physics.
Yet, the raised issue does not concern the principle of invariance of the form of the physical laws. Indeed, the Hamiltonian formulation has the same form in every Minkowskian reference frame in spite of being based on a mathematical object which is not an invariant under the Poincaré group. The relativity principle is in fact more general than the (Poincaré) covariance of physical laws, which is only a very effective language to state and handle it.
I think the preference of the Lagrangian formulation in relativistic theory relies on the fact that Minkowskian tensors have a relatively simple algebra and the use of a scalar (the Lagrangian) as the fundamental notion turns out to be more easy at the end of the day than exploiting the component of a tensor (the Hamiltonian).
Vice versa, in classical physics, the Lagrangian is not a Galileian scalar: it is a scalar under the internal transformations of an inertial reference frame but not under the classical boost. So that to prefer the Hamiltonian or the Lagrangian are choices more or less equivalent in classical physics. If one adopts from scratch the Hamiltonian formulation he/she can profitably take advantage, for instance, of the canonical formalism which is of great help in studying the problem of motion. Furthermore the formulation of the Noether theorem is physically more easy in Hamiltonian formulation: the generators of the simmetries are the conserved quantities themselves, differently than in Lagrangian formulation. These facts are also true in relativistic physics, but their statements are a bit awkward, since they use a fixed time formalism which is more natural in classical physics.