It is not Microsoft's job to protect your password, it is yours.
Or did you assume it was GitHub itself that was compromised? The article doesn't say where the creds were obtained. My guess is plain old phishing. Though it could also be cred-stealing malware, that seems to be making a comeback, in the form of browser extensions and mobile apps. Either way, those aren't Microsoft's fault.