When a container is connected to multiple networks, its external connectivity is provided via the first non-internal network, in lexical order.

Sources:

https://github.com/docker/libnetwork/issues/1141#issuecomment-215522809

https://docs.docker.com/v17.09/engine/userguide/networking/