We establish a simple relation between curvatures of the group of volume-preserving diffeomorphisms and the lifespan of potential solutions to the inviscid Burgers equation before the appearance of shocks. We show that shock formation corresponds to a focal point of the group of volume-preserving diffeomorphisms regarded as a submanifold of the full diffeomorphism group and, consequently, to a conjugate point along a geodesic in the Wasserstein space of densities. This establishes an intrinsic connection between ideal Euler hydrodynamics (via Arnolds approach), shock formation in the multidimensional Burgers equation and the Wasserstein geometry of the space of densities.