When you install from your recovery partition you get the latest version of OS X/mac OS that was actually installed on your Mac; Internet recovery gets you the version with which your Mac shipped, so, in your instance, El Cap and Yosemite, respectively.
You're correct about there being no version of OS X installed in a recovery partition, which is, after all, only about 500 MB in size.
Last edited by artie505; 09/25/16 04:00 PM. Reason: More