Apple, Yahoo, and Google all have terms of service that allow them to read users' emails if necessary, according to research done by The Guardian. Apple's iCloud Terms and Conditions includes a clause that gives Apple permission to disclose Account information and Content, including iCloud email, when necessary by law, to address security, fraud, or technical issues, or to protect the rights and property of Apple.
You acknowledge and agree that Apple may, without liability to you, access, use, preserve and/or disclose your Account information and Content to law enforcement authorities, government officials, and/or a third party, as Apple believes is reasonably necessary or appropriate, if legally required to do so or if we have a good faith belief that such access, use, disclosure, or preservation is reasonably necessary to: (a) comply with legal process or request; (b) enforce this Agreement, including investigation of any potential violation thereof; (c) detect, prevent or otherwise address security, fraud or technical issues; or (d) protect the rights, property or safety of Apple, its users, a third party, or the public as required or permitted by law.
Google, Yahoo, and Microsoft's terms of service all contain similar wording granting the technology companies unfettered access to content. The Guardian initially began investigating the rights of major companies to access user email after Microsoft looked through the personal Hotmail account of a blogger in order to discover the source of a Windows 8 leak.
Microsoft employee Alex Kibkalo was found sending a tech blogger parts of Windows 8 code back in 2012, allowing the blogger to access screenshots of the operating system, which were then posted online. Microsoft fired Kibkalo, but its methods of discovery were questioned, prompting the company to make a statement on its investigation policies, pledging not to read customer emails except in circumstances where a court order would be justified and vowing to announce such searches in its bi-annual transparency report.
While it is Microsoft that's under fire for reading the email of its users, as mentioned above, Apple, Google, and Yahoo have the same rights to access content under questionable conditions. Apple does not mention whether or not it accesses iCloud email for non-security reasons in its own transparency reports and it is unclear whether the company has accessed private content in the search for leaks.
Apple is a notoriously secretive company, however, going to great lengths to protect its upcoming products. According to Apple CEO Steve Jobs, product secrecy is one of the specific tenets that has been responsible for Apple's success, and in 2012, Tim Cook said the company would "double down on secrecy on products."
Nevertheless, Apple has had a hard time keeping leaks under wraps. The iPhone 5s and the iPhone 5c were both unveiled long before their release, and more recently, some significant iOS 8 leaks have come to light.
Apple and Google both opted not to comment to The Guardian on the clauses in their Terms of Services, but all customers opt-in to possible searches when signing up for an email account with either company.