I'm not a lawyer so I'm not in a good position to evaluate Github. But I do know that Github has an office in Amsterdam, The Netherlands, so there is at least the possibility that they have to be GDPR compliant.
But let's say you're buying from a random small business web shop in the US, and everything about that web shop clearly screams that their main business intention is work with US customers, it's just that their delivery service happens to ship world wide even though they clearly don't care about non-US customers. Then yes in theory they can "what they like with my data". In practice they probably have to define what "what they like" means in a contract, like a privacy policy, so it's not as if you can't know about what they will do. You are still able to make an informed decision of whether you want to do business with them.