Encryption can happen at different levels.
Your assumption appears to be that you set up a tunnel connection and everything within the tunnel is encrypted, however, this is not the full story, because if this was the only type of encryption, then apple would be able to read your message, because every message passes through Apple's servers and the tunnel would terminate there.
What happens is that the payload is encrypted, the metadata around the data is not encrypted, because it is needed to route the message to the recipient, to define the object type being carried, if the content is large, it contains how many parts need to be assembled at the recipients end and what the sequence number is, the metadata also identifies which key should be used to decrypt it.
When you first use a messaging application two keys are created, the first key is your private key, the second is your public key, a message encrypted with a public key can only be encrypted with the corresponding private key, likewise a message encrypted with a private key can only be decrypted by the corresponding public key, you cannot decrypt a message encrypted using a public key with the public key, or decrypt a message encrypted with the private key with the private key, this is called asymmetric encryption.
You give your public key out to everyone that you message, only you have the private key, if someone encrypts a message with your public key, only you can read it, you can respond to them with a message encrypted with their public key, which they can decrypt with their private key.
When you have a group message is when it gets trickier, because the safest way, is to send a copy of each message to each member of the group, using each members individual public key, however, another way is to exchange the public and the private key over a secure channel and then store them in an encrypted vault accessible only with the members private key.