E7 is the dominant V of the A minor key. However, an alternate way to look at this is that since C Major and A minor are relative keys, the E7 is functioning as a dominant seven substitute for the iii minor chord in C Major ( which would be E minor - this is a very common substitute ), and has the added bonus of setting up the move to the relative minor key ( A minor ), since it is also the V7 of A minor.
Pretty nifty, eh? As we all know, the V7 to I chord is the single most common resolution in all of music. Since it is so common, though, most composers look for ways to "dress it up" all the time - otherwise everyone's songs are seriously going to sound the same.
So chord substitution tricks are what all the kids are doing these days, lol.
Out of the loop? I didn't know there was a loop!