For GitHub to remain profitable they have to appease those shareholders you mentioned.
Incorrect. They need to appease/trick/threaten/etc those that are paying for their services. Shareholders just demand they do so at the greatest (often short term) rate.
Why? What is the correlation between profit and shareholder sentiment (besides the fact that shareholders want said profits)? They don't really influence the operation of the business meaningfully.