Another fact, is the Recovery partition would naturally be erased (or non-existent)
in a computer with a 'new' hard disk drive, or 'secure erased' existing disk drive...
And the lack of Internet Recovery, will not allow the computer to go online to restore
these essential functional bits, as that naturally would be removed in a legal & correct
process to prepare the unit for re-sale; or even if gifting to a charity or an individual.
• What to do before selling or giving away your Mac - Apple Support
The general delivery of advice in this Support document is not fully correct, in this situation.
{If the computer was to stay in the same household, another user account, (admin)
could be applied; then other issues or questions may arise should these users each
have iTunes or other store accounts. Their content purchased while logged in and
each with a separate AppleID, may involve detailed steps to adequately address.}
In the olden days, to have a demonstration system installed so a potential user would
see the computer running, I'd set up an Admin account (generic) and let the charity
thrift store know its password; and set up a 'daily user' (no guests in old OS version)
with limited permissions, so the computer would not restart into the Admin account.
Then anyone happening across the unit for sale, would not be able to mess it up much.
But see it was in working order and decide if they wanted to gamble on buying it; with
all original accessories, manuals, software, and if available, original box with receipt.
The question, "If I erase the hard disk on iMac what version of OS X will I get" is answered
because if you actually erase the hard disk on the model in question, using the prescribed
method of correct OS X software on media discs, the actual answer would be "None."
{Or none that would be legal, if workable by any other means, for a new owner to use it.}
So perhaps now the best advice to follow, as those in control of accident traffic say, is: "move on..!"