This seems to be a mystery. I haven't found any good explanation yet; I don't know if this is because the subject has been neglected so far, or if it's because the very occurrence of the phenomenon is still controversial and so nobody has attempted to give an explanation for it. There seems to be some idea that descriptions of accent in old Latin texts are unreliable because they may have been influenced by people's ideas about Greek accentuation, or something like that. And the question of how much we can learn about stress from Latin poetry is apparently unsolved to this day. So there seems to be relatively little uncontroversial evidence about aspects of Latin stress and prosody beyond the well-known penult-weight-based stress rule.
##What is the evidence for this pattern of accentuation?
The Roman Pronunciation of Latin, by Frances E. Lord, contains a relevant Priscian quote. (It's from 1894, so I don't know if Lord's statements are outdated.)
Priscian thus defines the accents:
[Keil. v. III. p. 519.] Acutus namque accentus ideo inventus est quod acuat sive elevet syllabam; gravis vero eo quod deprimat aut deponat; circumflexus ideo quod deprimat et acuat.
Then after giving the place of the accent he notes some disturbing influences, which cause exceptions to the general rule:
[Keil. v. III. pp. 519-521.] Tres quidem res accentuum regulas conturbant; distinguendi ratio; pronuntiandi ambiguitas; atque necessitas. . . .
Ratio namque distinguendi legem accentuum saepe conturbat. Siquis pronuntians dicat poné et ergó, quod apud Latinos in ultima syllaba nisi discretionis causa accentus poni non potest: ex hoc est quod diximus poné et ergó. Ideo poné dicimus ne putetur verbum esse imperativi modi, hoc est pōne; ergó ideo dicimus ne putetur conjunctio rationalis, quod est érgo.
Ambiguitas vero pronuntiandi legem accentuum saepe conturbat. Siquis dicat interealoci, qui nescit, alteram partem dicat interea, alteram loci, quod non separatim sed sub uno accentu pronuntiandum est, ne ambiguitatem in sermone faciat.
Necessitas pronuntiationis regulam, corrumpit, ut puta siquis dicat in primis doctus, addat que conjunctionem, dicatque doctusque, ecce in pronuntiatione accentum mutavit, cum non in secunda syllaba, sed in prima, accentum habere debuit.
[...]
In the matter of exceptions to the rule that accent does not fall on the ultimate, we find a somewhat wide divergence of opinion among the grammarians. Some of them give numerous exceptions, particularly in the distinguishing of parts of speech, as, for instance, between the same word used as adverb or preposition, as ánte and anté; or between the same form as occurring in nouns and verbs, as réges and regés; and in final syllables contracted or curtailed, as finīt (for finivit).
But since on this point the grammarians do not agree among themselves, either as to number or class of exceptions, or even as to the manner of making them, we may treat this matter as of no great importance
(41-43)
So I would guess the reason this phenomenon is "scarcely mentioned in Latin language classes" is because it seems to be unclear and disputed.
It seems the matter has been uncertain for quite some time. Spinoza's Ethica from Manuscript to Print, by Piet Steenbakkers (1994), mentions the orthographic convention of putting a grave accent on the last syllable of certain words that is discussed in Jasper May's answer, and says
Taking a closer look at the arguments adduced for the convention of putting the grave mark differentiae causa, we find that they fall into two groups: there are those who think of it as a merely orthographical phenomenon, and those who think it implies a different pronunciation as well.
(p. 73)
Steenbakkers says that Aldus Mantutius's Latin grammar recognizes these words as an exception to the main Latin penult-weight-based stress rule, and suggests that "Manutius apparently derives these ideas from the traditional grammatical authorities: Donatus, Priscian, and Pseudo-Priscian" (p.74). A footnote on the same page elaborates:
Explicit statements to the same effect [as the Priscian passage quoted above] are to be found in Donatus's Ars maior 2.13 (ed. Holtz 1981, 610.11-2) and Priscian's Inst. gram (ed. Hertz 1855-9, GL 2-3), e.g. 'differentiae quoque causa multa solent vel taceri vel contra regulam proferri' (GL 2, 372); other examples: GL 3, 27.4-10; GL 3, 47.4-9. There is a hint of this in Quintilian too, when he discusses (and rejects) the notion that the need to distinguish between words sometimes requires a shift of accent: 'Ceterum scio quosdam eruditos, nonnullus etiam grammaticos sic docere ac loqui ut propter quaedam uocum discrimina uerbum interim acuto sono finiant [..]; quod tamen in aduerbiis fere solis ac pronominibus uindicant, in ceteris ueterem legem secuntur' (Inst. or. 1.5.25; ed. Winterbottom 1970, 32-3). Statements to the effect that laws of accentuation have exceptions for the sake of distinction can also be found in other grammarians. See, for example, Pompeius, Commentum Artis Donati (ed. Keil 1868, GL 5, 131): 'nam quando dicimus poné [...], non ideo dicimus, quia sic debet dici, sed ut sit discretio. [...] ideo in ultima syllaba inveniuntur accentus.'
Steenbakkers goes on to mention a text from 1586, De recte pronunciatione Latinae Linguae dialogus by Justus Lipsius, that apparently contains a speech/dialogue/lecture attributed to the French humanist Marc Antoine Muret that is critical of the practice of pronouncing these words with stress on the final syllable:
At one point in his lecture Muret sneers at the (apparently quite popular) assumption that the Latin accent can occasionally shift to the final syllable. He criticizes Latin as pronounced in his days:
Cùm enim Serò, Palàm, Doctè efferunt, sic efferunt Seró, Palam, Docté. [...] idq́ue necessarium, vt effatu discernas à Séro, Dócte.
For when they pronounce 'serò', 'palàm', 'doctè', they pronounce it as though it should be 'seró', 'palám', 'docté'. [...] And you must do that, if you want to distinguish them in speech from 'séro' and 'dócte'.
Such a pronunciation is absurd in view of unambiguous statements by ancient grammarians (e.g. Quintilian) that the ultima of a Latin word is never accented. If, on the other hand, the grave denotes the absence of stress, then séro and serò etc. are merely variant spellings for identically pronounced words. Summing up, Muret thinks the habit of putting a grave on the ultima is misguided.
(pp. 75-76)
##How did this pattern of accentuation originate?
I have never seen an explanation for this, beyond the mention of the supposed value in avoiding homophony with words belonging to other categories that is referenced in the question.
Everything that follows is just speculation, as I haven't seen any literature that explicitly connects the putative adverb final-stress phenomenon with possible lack of stress on the following word, but I wonder if there may be a connection to the phenomenon of cliticization.
According to "Phonological constituents and their movement in Latin", by Brian Agbayani and Chris Golston (2016):
More than a century’s worth of research has established that function words in Latin are prosodically dependent on nearby lexical words ... The combined evidence points to function words forming recursive prosodic words with nearby content words (Selkirk 1996)
(p. 3)
And:
Metrical work on where word-stress falls in a line of poetry shows that many function words fuse so closely with the following word that they are positioned within the line as if they were a single word. Thus Frank (1904) finds that strings like sed id ‘but it’, sed amor ‘but love’, sed homines ‘but men’ pattern like two-, three- and four-syllable lexical words do. With trisyllables in particular, Frank shows that function words so closely adhere to what follows that they can take the only accent of the group: séd agit rather than sed ágit ‘but I lead’ and séd erus rather than sed érus ‘but the head of the family’, where the recessive accent expected on the content word shows up on the preceding function word. Frank points out that the same types of combination are often written together in manuscripts: etea for et ea ‘and those’, utipse for ut ipse ‘so that he’. His data suggest that ‘the monosyllabic particles...like all other independent words, have originally an accent, as in fact the grammarians expressly declare; if they very frequently lose this accent, this happens simply because they are subordinated in sense to the other words of the sentence and, at the same time, in the majority of cases, cannot preserve their accent through the operation of the three-syllable law’ (1904: 160).
(p. 6)
Allen (Vox Latina, 2nd edition) mentions in passing that in Classical Latin, certain multi-word prosodic units may have been stressed as if they were single words. Two of the specific examples Allen mentions seem to be prosodic units ending in disyllabic verb forms with light penult syllables, where apparently it has been suggested that the verbs may have been pronounced without stress as enclitics (and consequently, a stress would fall on the immediately preceding syllable, which would be the last syllable of the preceding word in the prosodic unit):
Apart from the enclitic combinations, certain other groups of closely connected words were liable to be treated as unities for accentual purposes. We know from the grammarians that certain conjunctions were unaccented, e.g. at, et, sed, igitur (the last in fact probably arose by vowel weakening from agitur in expressions such as quid agitur?). When followed by a noun whose case they governed, prepositions were also subordinated accentually; one consequently finds inscriptional forms such as intabulas, written as a single word; and Plautus and Terence show evidence for enclitic accentuations of the type apúd me, patér mi. The same seems also to have applied to idiomatically as well as grammatically connected words, such as morém gerit, operám dare; but we have only partial knowledge of such phenomena, and are largely dependent on not always clear metrical evidence.
(p. 88)
I thought this might be relevant because adverbs often come immediately before the verb in Latin. "Latin Word Order" from Rebecca Harrison’s Cogitatorium says
Adverbs do not have endings to indicate agreement, so they are “velcroed” to the word they modify, usually coming directly before.
- adverb : verb/adjective/adverb
- nōn venit
- tam pulchra
- tam celeriter
Earlier on the same page, Allen mentions the possiblity of enclitic accentual changes leading via analogy to the development of special stress rules that conflict with the main weight-based rule:
One cannot ... exclude the possibility of an analogical accentuation of the type bonắque after the pattern of bonúsque, etc. Priscian specifically mentions such an analogy in the case of the fused compounds utrắque, plerắque, after utérque, plerúsque (K. ii, 181: 'communis trium uult esse generum'). But it is doubtful whether these analogies apply to the classical period.
So maybe it's possible that the pattern (if it really existed) of stressing the last syllable of certain adverbs originated in phrases where an adverb was followed by a disyllabic word with a light initial syllable that lost its accent and was pronounced as an enclitic? For example, the Lewis and Short entry for pone mentions the example "Pone petunt, exim referunt ad pectora tonsas"; from Ennius; if the first part of this was pronounced as /poːˈnepetunt/, it would have the stress pattern that would be regular for a single word according to the Classical Latin penult-weight-based stress rule.
One issue with the kind of "metrical" evidence that Agbayani & Golston and Allen allude to is that apparently there is apparently still little consensus about how Latin stress accent related to meter. Language and Rhythm in Plautus: Synchronic and Diachronic Studies, by Benjamin W. Fortson IV (2008), says
One metrical phenomenon that has historically been used to investigate the phrasal articulation of Latin speech is the verse ictus, the beat of the line. There is great disagreement about its nature and whether there even was such a thing in Plautine poetry at all.
(p. 30)
Fortson also has a section about verbs where he says
a sequence of iambic word followed by iambic verb (the type pater petit) barely ever fills a measure of Plautine verse, as discussed in Ch. 3, which indicates rather strongly that such a sequence was not prosodically equivalent to a four-syllable word of the same metrical shape, and that therefore the verb did not cliticize to the preceding word.
(p. 265)
I want to emphasize the uncertainty of this answer: it's really just something that I've been wondering about, and I think it has some information that may be relevant, but I don't think it is at all an adequate answer to the question posed. I hope someone will post a more complete answer in the future. (I'd prefer not to have this answer accepted, as I may want to delete it in the future if I discover something further that reveals that the information here is irrelevant.)