I think it's a Microsoft thing. A ton of their stuff has unique error codes just for this purpose.
Remember back when OS/2 had a special error code for every error message?
Codes like that are a part of IBM culture that spilled out to other companies.
Sure beats the General Protection Fault we were so accustomed to back in the day. :)
they had the MSDN cd (microsoft developer network) for documentation in these days; that cd had a lot of thorough documentation for apis and developer tools.
All heavily internationalized software should have error codes.
PHP was just ahead of the T_PAAMAYIM_NEKUDOTAYIM curve.