Apple can't see the content of your iMessages, but can find out the contacts on your Messages app
When you try to contact someone through the Messages app, it pings Apple's servers to make sure that the recipient of the message has an iMessage account. Because of this, Apple does find out who you are trying to get a message to, and whether they have an iMessage account. And if that isn't enough to make you feel as though your privacy has been violated, the tech titan gets to learn the date and time that your contact was pinged. Also logged is the IP address that the request came from.
And yes, Apple does delete the information. But not until the info is kept on a log for 30 days. Apple can be asked to turn this information over to law enforcement if requested to do so via a court order.
Any name entered as a contact on an iPhone can be discovered in the way we outlined above. The company does makes it clear though, that a legitimate subpoena or court order is the only way that this information sees the light of day.