I'm going to argue, contrary to others, that the concept of "Borrowed Chords" is actually very useful, not just for learning, but to help understand music from a programmer's perspective. It helps us understand where the familiarity stems from and where the "flow" tends to want to lead (knowing from where the borrowing is coming). Some are more accepting of the math of harmonic pull - something definitely not precisely defined.
But IMHO as we better mathematically predict how music is heard and what commonly gives it appeal, we are entering a new territory. We're not there yet, but at some point we might learn to weigh probabilities and understand what causes music to be of greater quality to some average listener (in a particular genre or culture). I'm not arguing for musical AI. But if someone should want to create AI that would write well-liked music, they would need to recognize 'attractive' tendencies that make a listener enjoy listening. It would not be possible without some weighted functions.
Part of my argument is that it is necessary to recognize that musical structures that are used frequently can become so overly common that the flavor is not longer pleasing. Spicing things up can be a natural answer to this, but it is relative to prevalent taste. One is not going to go from mild to "tiger tears", "crying waterfall" levels (Dishes at a Thai place out here affix names like that to their spiciest meals.)
And spicing things up can be done in different ways. Using texture and rhythm to do so can predominate in some styles and contexts so that straightforward harmony won't grow old quickly, if at all.. But if we produce music with less interesting sounds, maybe just basic keys or guitar, there is a definite tendency to embellish by adding the color of slightly less obvious harmonies and melodies.
A relative key uses the same notes as its sibling. Sometimes the tonic could be either of the two possibilities, and a bit of mystery or surprise can add interest. With parallel keys it can be sort of the opposite - you're benefiting from the strong function of the tonic, springing into recognizable relationships borrowed from a parallel key. Borrowing is just a term that points at some very common methods of adding color to a progression. There are other common methods of adding chromatic pitches (for instance in stepping up or down to the target chord root, or using a chromatic run between chord tones). But Borrowing refers to methods that create a mysterious blend of harmonies in the mind of the listener. If we listen we can hear boundaries, and this methods are definitely not pushing any extreme limits. They're the very comfortable ones that still add sufficient color to be commonly used. I think a less common example of borrowing is to use a Major III in Major. C#m is the tonic of the relative minor key of E Major. The V Chord of C harmonic and melodic minor is a major chord.
So understanding this helps a student "see" potential source harmony and melody notes when they instinctively find themselves using the chord.
Other examples are the borrowing of the phrygian mode chords of bII and bIII in a major key, and the borrowing of the iv from harmonic minor.
Then there's the borrowing of the bVII chord from the mixolydian mode, and the borrowing of the bIII chord from one of the minor modes (Aeolian, Dorian, Melodic, Harmonic). We can see that use of a "borrowed chord" does not mean that we necessarily have a specific source.
There are of course other examples that are a little unusual. The bV chord used in rock that is based on the bV note in the blues scale, which is flattered by the bIII chord. (Think of the bV and dual minor/major tendencies of the blues scale like this - the I has an overtone which is the same (if pure) as the M3. And the m3 is the pitch a P5 below the b7. And 4 half steps (a M3) below the b7 is the b5.
Such choices may come (may be arguably being essentially "borrowed") from the possibilities/tendencies we hear as a result of unconscious familiarity with the creative uses of the harmonics of music. It really takes one just a single listen to a single example to get one these creative uses of the harmonics of music "felt" by our minds, because there's a mathematical sense to them. But the term "borrow" implies that the tones are the result of something, and they could, embryonically simply be the result of past listening experience. Or they could be more "defined by the accompanying chords".