Apple Logs iMessage Contact Phone Numbers
Apple touts the end-to-end encryption and overall privacy of its iMessage service, but Sam Biddle of The Intercept reveals a loophole: when you enter a phone number to start a conversation in Messages, the app contacts Apple’s servers to find out whether to send the message via iMessage or SMS. The problem is that Apple’s servers currently log the contact number, the date and time, and your IP address (which could disclose your general location). Apple has verified that it keeps these logs for 30 days and will give them to law enforcement if compelled by a court order. We hope these revelations will encourage Apple to reassess the privacy implications of this system.
I am reasonably sure that they don't have a choice. SMS messages require logging, and Apple doesn't know if the message is SMS until it checks the phone number. The only way to 'scrub' that information is if Apple then ties the phone number you entered to a SMS-only contact or a iMessage contact.
If it ties it to an iMessage contact, that leaks far more information (person has an iCloud account tied to that number) than simply logging the data they are required by law to log.
The moral of this story: don't use phone numbers unless you have to.