Batteries are cylindrical because it’s the most efficient shape to make them in. There is a central electrode with the electrolyte around it. By making it cylindrical it’s distributed evenly. Imagine having it square, then in the corners the layers would be thicker than on the sides.
So that explains why the cells and normal AA batteries are cylinders. So why not have a 9 volt cylinder? That’s because the chemistry used for alkaline batteries produces 1.5 volts. A single cell, regardless of size, only produces 1.5V. So how do you get 9V out of a 1.5V battery? By putting 6 of them in series. 6 x 1.5V = 9V.