Same reason: to prevent user-generated/user-hosted content from being able to read GitHub.com cookies.
The fully writeup is here: https://github.blog/2013-04-09-yummy-cookies-across-domains/
The fully writeup is here: https://github.blog/2013-04-09-yummy-cookies-across-domains/