It is tracking, sure, but there is a tradeoff. Some people might not care that github knows they have a lemmy account, and for those people they don’t have to manage yet another login, so they are more likely to participate.
Heck Lemmy could build in federation identity into lemmy, so it doesn’t matter your on lemmy instance X, you can still bring your identity from instance Y and not have to post from your home instance.