According to me the third argument in socket system call i.e 0 is used because we want kernel to decide the default protocol suitable for the communication ..... default protocol can be TCP also.
By using 0 as a 3rd argument in socket system call, default protocol will be used for a given domain and given connection type in a socket System Call.
the concept of third argument of the socket is that it enables default protocol depending on the type of the communication . let say , if you are using SOCK_STREAM style then the default protocol enabled is TCP . similarly if you are using SOCK_DGRAM style , then the default protocol will be UDP protocol.