As I understand it, GitHub make the majority of their money from their on-premises 'Enterprise' product, which is sold with a 'contact us to discuss' price tag. Also they raised a huge sum of money while already being profitable. I wouldn't worry about them vanishing.