It's because legifrance carries snapshots of the articles. Git is very good at tracking the changes between them.
So for earch article, the codes tracks "when" the article changed, stores it in a hashtable, and replays the "time" (date) for each snapshot, and creates a commit each time.
So for earch article, the codes tracks "when" the article changed, stores it in a hashtable, and replays the "time" (date) for each snapshot, and creates a commit each time.