Given the thin details in the story it's hard to be sure, but the simplest explanation is the credentials were not encrypted when the hacker made a copy.
The passwords might have been encrypted in a database, but many so-called 'transparent' database encryption schemes serve only to protect the database file from being copied and reused; they transparently decrypt the data to clients who access the data through the engine with legitimate credentials. If the hacker retrieved the credentials through a query using those credentials (perhaps by abusing some internal service designed to email people their forgotten passwords), he would have retrieved the passwords in the clear.
It's also possible the passwords were stored as 'unsalted' hash values, so they would be vulnerable to rainbow table attacks.
Mail.ru is an old service that has been around for decades. If they've never modernized the security of their user/password database, any of these old password storage schemes would have been possible, leaving them vulnerable.
Because Google and Yahoo generally know how to do security right, yet were mentioned in the article as having been violated, something else may be going on. As the article mentioned Russian and Chinese services, we can speculate they may be subject to rules requiring email services to turn over actual user passwords to government or law enforcement agencies. That would mean the companies would have to store passwords in a recoverable way, such as encryption, instead of using a strong password hashing algorithm such as PBKDF2.
It's also possible that the Google and Yahoo accounts fell victim to shared password attacks. After having learned firstname.lastname@example.org's password, they could have simply substituted email@example.com and firstname.lastname@example.org and tried them that way. But verifying millions of passwords would likely catch the attention of the security teams at Google and Yahoo.
Again, this is speculation based on weak details, but all of these attacks have happened in the past to different providers.