Because they have users and business in EU. If you want to sell stuff in EU, that product must comply with EU law.
Or could it have to do with the successor agreement of safe harbor?
I guess Github could decline to pay. But then they could do no business in the EU, and then there is the likely impact on Github employees - similar to how BetonSports' CEO was arrested when he changed planes in the US: http://www.independent.co.uk/news/business/analysis-and-feat...