cardinal (adj.)youdaoicibaDictYouDict[cardinal 词源字典]
"chief, pivotal," early 14c., from Latin cardinalis "principal, chief, essential," from cardo (genitive cardinis) "that on which something turns or depends; pole of the sky," originally "door hinge," which is of unknown origin. Related: Cardinally.

The cardinal points (1540s) are north, south, east, west. The cardinal sins (c. 1600) are too well known to require rehearsal. The cardinal virtues (c. 1300) were divided into natural (justice prudence, temperance, fortitude) and theological (faith, hope, charity). The natural ones were the original classical ones, which were amended by Christians. But typically in Middle English only the first four were counted as the cardinal virtues:
Of þe uour uirtues cardinales spekeþ moche þe yealde philosofes. ["Ayenbite of Inwyt," c. 1340]
By analogy of this, and cardinal points, cardinal winds, cardinal signs (four zodiacal signs marking the equinoxes and the solstices), the adjective in Middle English acquired an association with the number four.[cardinal etymology, cardinal origin, 英语词源]
prudence (n.)youdaoicibaDictYouDict
mid-14c. (c. 1200 as a surname), mid-14c., "intelligence; discretion, foresight; wisdom to see what is suitable or profitable;" also one of the four cardinal virtues, "wisdom to see what is virtuous;" from Old French prudence (13c.) and directly from Latin prudentia "a foreseeing, foresight, sagacity, practical judgment," contraction of providentia "foresight" (see providence). Secondary sense of "wisdom" (late 14c.) is preserved in jurisprudence.
virtue (n.)youdaoicibaDictYouDict
c. 1200, vertu, "moral life and conduct; a particular moral excellence," from Anglo-French and Old French vertu "force, strength, vigor; moral strength; qualities, abilities" (10c. in Old French), from Latin virtutem (nominative virtus) "moral strength, high character, goodness; manliness; valor, bravery, courage (in war); excellence, worth," from vir "man" (see virile).
For my part I honour with the name of virtue the habit of acting in a way troublesome to oneself and useful to others. [Stendhal "de l'Amour," 1822]
Especially (in women) "chastity, sexual purity" from 1590s. Phrase by virtue of (early 13c.) preserves alternative Middle English sense of "efficacy." Wyclif Bible has virtue where KJV uses power. The seven cardinal virtues (early 14c.) were divided into the natural (justice, prudence, temperance, fortitude) and the theological (hope, faith, charity). To make a virtue of a necessity (late 14c.) translates Latin facere de necessitate virtutem [Jerome].