Dreadnoughts and Virginias: why is Australia paying more than twice the price for submarines?

Paul Keating described the AUKUS deal negotiated by the Albanese¬†government as the “worst deal in all history”. Is he right, and if so, just how bad is it?