int bind(int socket, const struct sockaddr *address,
socklen_t address_len);
Man page says it specifies the length of the sockaddr structure pointed to by the address argument.
But why bind() can't figure out the length itself, since the first member (eg:AF_INET or AF_INET6...) of sockaddr structure implies the actual structure which contains it. So I think bind() can figure out the length of the sockaddr structure by inspecting address->sa_family.
You may say that, these strctures are diffrent in different OS. But the implemnetation of bind() can also be designed for diffrent OS. The length of these structures are constant in the same OS.
Remember how many different protocols go through these same socket calls. These structures are all the same size, but there may be other protocols where they're not.