In chord progressions like I - iii - IV - I64 - V - I, which occurs extremely frequently, the IV chord is sometimes replaced by a V6/V, V65/V, or viio/V chord. Regardless they are secondary dominant / leading-tone chords, they appear to have subdominant (predominant) function. Why?
All the above chords emphasize scale step 4, perhaps sharpened. The path 1-4-7-1 seems to be common through many pieces; actually, the pattern of scales steps 4, 7, and 1 often marks a cadence of some sort. (These scale steps need not appear in the same voice.) While I tend to think that most music patterns are learned (cultural), it can be noted that scale playing scale steps 4 and 7 (in a major key) does mark that scale uniquely.
The I64 chord (in this case) is often analyzed as 5 in the root with passing 3 and 1 scale steps is part of a cadential cliche (I64 to V7).