I noticed there are many people selling the free versions of OS X/mac OS on eBay these days, with a few just being the download itself hosted on cloud services. I would hope Apple would be far more concerned about those folks than me giving one copy to a friend.
People have been selling bootleg OS X/macOS installers, even grey discs, on eBay for years
, and Apple has never so much as blinked, and while I agree with you that their attitude towards bootlegs should, by implication, certainly make your benign plan "kosher", the EULA still prohibits it.
I find the matter really amusing, because a few years ago I listed a Mac package including backup installer discs on eBay, and believe it or not, the Business Software Alliance actually made eBay take my listing down until Apple opted to not rebut my letter to their legal department in which I pointed out that the EULA not only allowed me to make such backups, it actually obligated me to include them in any transfer of the Mac.