As the flats are stronger, it greatly reduces the chance of the fastener head being rounded off. Rounding the head of a fastener (or rounding off) is when a socket applies too much torque to the corners of a male fastener head and deforms it.
This results in the head of the fastener losing its flat-sided shape and becoming round). It also means that more torque can safely be applied to the fastener. Poorer quality sockets with flat walls apply the torque closer to the corners of the fastener head, thus increasing the chance of rounding it off.
For more information see: How does a socket work?