They were profitable in 2008, but by 2016 they were running at a loss.
https://www.bloomberg.com/news/articles/2016-12-15/github-is...
I'm guessing it was from corporate mismanagement, overbalooned salaries for initial employees, and probably hiring too quickly to meet demand.