I would guess that the use of "an" came strictly through spoken English because it was too awkward to say "a apple". And in such situations "n" seems to be our letter of choice, as is shown in words like "tobacconist" as opposed to "tobacco-ist". Because of this tendency toward verbal ease, I would go with "an".