Why is the fuselage on an airliner circular-shaped?
If you pressurize any hollow structure, it will try to assume a round shape. If you want to create a lightweight pressure vessel, again a sphere will be the most efficient result, because there the stresses in the skin will be equal at every point. Blow up a party balloon if you are in doubt.

A sphere is not the most efficient shape for aerodynamics, so fuselages are elongated spheres with a nice fairing at the end. If you make them cylindrical in the middle, you can build most bulkheads on the same jig and can interchange sections of the internal fairings. Plus, if you need a longer or shorter fuselage for the next version of the plane, you can easily add or remove sections - the parts will still fit after the modification.

Note that the fuselages of unpressurized aircraft don't follow this logic A Short Skyvan or a Dornier 228 have fuselages with a rectangular cross section, so large cargo can fit in.

Also, some fuselages are combinations of cylinders. The Boeing 377 Stratocruiser used the lower fuselage of the B-29 and had an upper, larger cylinder on top to give the passengers more room.



Boeing 377 cross section (picture source)

For the same reason, rocket stages are cylindrical, too. They also need to be aerodynamic, have to tolerate high internal pressure and need to be lightweight.