Both Italian and French being romance languages (derived from Latin) and very close cousins, the mechanism of introduction of article is the same.
A justification could be that name of a country is derived from the name of people with the suffix -ie or -ique, as a substitute for "le pays des ...":
La Franc(i)e = le pays des Francs
La Tchéquie = le pays des Tchèques
L'Allemagne = l'Alémanie = le pays des Alamans / Allemands
La Belgique = le pays des Belges
Or from a characteristic of the place:
La Provence = la province (romaine)
Europe containing rather old places (in terms of documented human occupation), almost every name of valley, land, country can be traced to some reason.
The English language did not adopt this usage of the article but also adopted markers, such as the Germanic suffix -land, as in:
England, Scotland, Holland
Or the Latin a -ia suffix (more rarely -ium):
Anglia, Czechia, Britannia, Belgium, Latium
The opposite question is why cities and villages did not have an article in French. That's probably because, like persons, they acquired a personality of their own:
Paris, Rome, Nyons
On the other hand, some cities and villages have retained the article, when it was obviously derived from a feature:
Le Havre = the safe harbour
Le Marais = a neighborhood of Paris that was indeed a swamp
La Plagne = a flat place (akin to La Plaine)
The bottom line is perhaps that while Germanic languages (English, German) consider that "regions and countries have a soul", Italian and French don't?
... and the more I think about it, the more obvious it seems that countries have less "personality" in French than in English. One could perfectly write:
France did not reply to the diplomatic dispatch.
To mean the French government. It would be correct to say:
La France ne répondit pas à la dépêche diplomatique.
But it would sound a little hollow, and perhaps ambiguous (it that the French government or the French public opinion?). It would be much more vivid to say:
Paris ne répondit pas à la dépêche diplomatique.
In French, Paris does have a strong personality as itself (remember the famous "Paris outragé...Paris libéré par lui-même et par son peuple"?), while La France is either a collective of the French people ("la France qui se bat") or an abstract civilizational unit ("la France éternelle").
Actually, a French author could write:
Le Quai d'Orsay ne répondit pas à la dépêche diplomatique (= the seat of the Foreign Ministry)