This happened due to an error Google made while implementing a certain password recovery mechanism.
Google has admitted that it stored passwords of some of its G Suite customers unhashed for years.
In the official blog, Google said that it has notified a subset of its enterprise G Suite customers about the passwords which were stored without cryptographic hashes that mask them.
This happened due to an error Google made while implementing a certain password recovery mechanism for enterprise users back in 2005. Google said that has there has not been any improper access or misuse of these plain-text passwords.