Well many companies are profitable (actually, it's the only prerequisite to stay alive). And arguably, Github isn't profitable enough to fuel its own growth, or they wouldn't need to take $250m from investors in exchange of shares. The question is: is it worth 2 billion dollars? As a developer my guts say yes, but I have no idea what their numbers look like...
When you want to reach a monopoly position, fueling growth with only your profits it's not sustainable. They are getting (cheap) money to scale faster than their profits would allow them to do.
It's the same reason why Uber, although making billions of revenue, still raises money: cheap money that boosts growth.
What kind of situations would result in previous investors looking for liquidity? Assuming it is a trade for equity, it would be counter-intuitive do divest a fast-growing company if you are at least risk-neutral, which VCs should be?