For a given cross-sectional area, material distributed further from the neutral axis increases the moment of inertia and section modulus.
A square section distributes its corners further away from the neutral axis than a circular section, making it more efficient in bending.