From : moby/moby#16645 (comment) :
Disconnecting a container from a network does not seem to remove /etc/hosts entries from the specified container for that network, though it seems the other containers on the network are updated to remove the container's entry