Uh, yeah. The sanction against Venezuela is recent, but sanctions against Iran for instance, have existed for a long time. They tend to come and go depending on agreements and current administration, but there certainly have been sanctions against Iran before, and they were also fiercely enforced. Even many non-US companies had to ban all business with Iran, due to the nice extraterritoriality factor (for instance, a few years back, Peugeot lost a big chunk of its revenues due to a sudden ban of all sales in Iran). It's nothing new.
I guess github was just way under the radar until it got bought by MS. MS obviously can't be.
An interesting question is what is banned exactly, and what is considered business. Like, in the case of github: we could understand (well, in the presence of the ban) that github could not have customers in Iran. But what about the big fraction of github users that are NOT customers? I guess actually most github users are not actual customers - just users of a free service. I don't have the figures, but I'd be willing to bet that the customers are only a small fraction of all users. So is any "free" user considered a customer, and is using github, even if you never paid a penny to them, considered doing business with github?