To put them in contact with their glorious heritage?
Very simply put, yes, or at least that is a significant part of it. The point is that Latin used to be important to educated people, especially in Catholic countries, as one of the scientific languages of international communication, a role it retained in some fields into the first half of the twentieth century, albeit it was largely residual by then. So it had practical sense to teach it in some school curricula, and then it was retained with a significant though gradually reducing part of the Italian by inertia and a vocal legion of advocates. It is also true that Latin literature exerted a
huge influence over Vulgar literary traditions, and particularly the Italian one (and others, also, party through it).
It is useful to know some Literary Classical Latin, or at least be familiar with its authors in translation, in order to understand Dante, Boccaccio, Petrarca, but also, say, more modern very important Italian authors like Leopardi (who was well-versed in Classics) just to name a few. While knowing Latin is not particularly needed to sort out Italian ortography, Boccaccio's style, for instance, is heavily modeled on Cicero's in terms of syntax (with constructions that are not current in spoken Italian) and also knowing Latin helps to get a better grasp of Italian (and Spanish, Portuguese, etc.) grammar at large.
So, knowledge of Latin was regarded, correctly, as helpful in mastering Italian (though of course, it is a
requirement for it). Also recall that Italy, unlike Latin America for example, is literally
teeming with Latin inscriptions, documents in Latin dating all the way to the Renaissance and beyond, and the like. So Latin is just
physically and visibly present all over the place.
Finally, advocates of keeping a place for Latin in the school curricula here often argue that is serves to hone the students' logical ability, due to some supposedly inherent logical nature of the language (by which they vaguely mean the need to train to recognize case endings and analize the phrase structures accordingly, which you would not need to do in Italian). This is a highly silly argument if taken out of context, which assumes some inherently superior nature of Latin (often associated with Greek in this) as language of thought and clarity. Obviously, all language are equally logical within their own system, and Latin has not special feature of this sort whatsoever. It
is true that studying Latin serves the purposes of developing some specific anyalitical skills, but studying any other language with a rich literary tradition and a highly codified grammar would do equally well, and perhaps better. Classical Arabic is more "logical" in this distorted sense than Latin ever was, for example. And obviously, if the point was really to develop logic, we'd teach actual formal logic instead, which is not done because of cultural reasons: bear in mind "logic" is this discourse does not truly indicate the "cold" formalism of mathematical logic or even Aristotelian syllogistics, but something more akin to a "literary" logic - that is, indeed, what would be rhetoric and dialectics in terms of the Aristotelian tradition. Italian school curricula were designed with a huge bias toward humanities, and specifically literature, as their original creators had had largely that sort of education, were convinced it "human" formative value (and its relevance to nation-building) and were strongly under the influence of philosophical Idealism and subsequent German schools which de-emphasised sciences and mathematics while looking for some form of "spirit". This has changed considerably in later decades, but the place of Latin in the system ha been strenuously defended (and some arguments in favor actually make a lot of sense).