There are two main reasons. Primarily, carbonated beverages are pressurized and cylinders and spheres are the only shapes that naturally contain pressure. In fact, if you pressurize a square, rectangular or even oval container it will try to get round. Second, it requires less material than other shapes. The canning companies try to use as little aluminum (or plastic) as possible for each can because it is not that cheap and they make literally billions of cans per year, so using a half a gram less per can saves tons of metal per year.