I don't think an authoritative answer to this can be given. It'd have to be someone who works with the relevant portions of the software, and odds are the exact algorithm is deliberately kept secret. However, we can offer more-or-less well-founded speculation.
Besides storing the password more-or-less-unsecured as speculated by StackzOfZtuff there is another possibility which appears plausible given what we do know.
Steam is a for-pay service. This means that they have certain information about the person behind the user account. For example, payment details, which are unlikely to ever be duplicated among individuals who aren't closely related to each other (family members in the same household, for example).
That leads to the obvious possibility that they are taking some of that personal information, and using it in some manner as a salt for hashing the account password. By having the salt fixed on a per-person basis, rather than on a per-account basis, it becomes trivially possible to store passwords securely (by properly salting and hashing them) while still providing the ability to detect when the exact same password (by whatever criteria the service uses) is used by multiple accounts. If I was faced with a requirement to be able to detect whether the same password is used by the same person for multiple accounts, that's certainly how I would approach the problem. Remember that the salt doesn't have to be secret to fulfill its role of enhancing the security of the system.
Of course, that doesn't say anything about why you are using the same randomly generated password for multiple accounts, negating much of the advantage of using random passwords while providing very little in terms of advantages over using different random passwords for every account...