A 9 volt battery uses six smaller 1.5 volt cells connected in series to achieve its 9 volts. But cramming that many cells into a compact enclosure leads to less space, resulting in lower energy density and shorter lifespan.
Why would a 9V battery have less energy density than 6 ordinary AA cells of 1.5V each? If you shrink down AA cells to the size and shape to pack into the rectangular 9V form factor, isn’t it exactly the same energy density as full size AA’s?