Adding to the narrative in other answers,
here is a chart that might help further explain why brass players
tend to prefer sheet music written in keys with flats.
As is shown, written keys that exclude the
“worst-to-play usual notes” (elaborated below)
on common brass instruments (except French horn)
are overwhelmingly keys with flats.
This is especially true for almost all lower-brass parts,
in which even the written-and-concert key of C, with no flats,
includes the worst-to-play notes for all but C tuba and triggered trombone.
The specific keys mentioned in the
question as being equally playable on
B♭ trumpet—written keys
E and A♭ —serve
well to demonstrate this chart.
The row for B♭ trumpet recognizes
the note scored as C♯ or D♭ as the most troublesome to play,
so keys with at most 1 sharp or 3 flats
are likely to be favored because they exclude C♯/D♭.
The aforementioned keys of E and A♭, however,
contain 4 sharps and 4 flats, respectively,
and thus include C♯/D♭ and are equally disfavored here.
If you are comfortable with music in these keys,
you are no doubt an experienced musician.
Not only are both keys relatively difficult to play
but trumpet music in A♭
(concert key G♭) is also quite rare.
Written keys WITHOUT
Name of Version of Open key usual note usual note
instrument instrument ------------ ---------------- ------------------
on score considered Con- Writ- Writ- Valves/ How many How many
cert ten ten position sharps flats
F French horn 4-valve F C G#/Ab 2-3 2,1 0 1,2
Bb Trumpet 3-valve Bb " C#/Db 1-2-3 1 0 1,2,3
Baritone T.C. " " " " " 1 0 1,2,3
Eb Mellophone " Eb " " " 1 0 1,2,3
Alto/Tenor horn " " " " " 1 0 1,2,3
Tuba C tuba C " " 1-2-3, 2-4 1 0 1,2,3
Tuba Eb tuba Eb Eb E/Fb " 6,7 2,3,4,5,6
Tuba Bb tuba Bb Bb B/Cb " 7 1,2,3,4,5
Baritone horn 4-valve " " " " 7 1,2,3,4,5
Euphonium " " " " " 7 1,2,3,4,5
Baritone horn 3-valve " " " 1-2-3 7 1,2,3,4,5
Euphonium " " " " " 7 1,2,3,4,5
Trombone slide only " " " 7th 7 1,2,3,4,5
Trombone F trigger " " C#/Db,F#/Gb 5th 0 1,2,3
“Worst-to-play usual note”
is an ad hoc designation
likely to find agreement among many players due to some of these factors:
The note is in the range usually scored for the instrument.
With 3 valves but no fingered slide,
timbre is compromised when a note is lipped into tune.
With 3 valves and a fingered tuning slide,
coordinating the slide quickly is difficult.
With an in-line 4th valve, pinkie-vs-ring-finger agility
is anatomically hampered.
With an opposite-hand 4th valve, coordinating the hands quickly is difficult.
On a trombone, a quick slide excursion is a gymnastic feat.
French horn players have a right to complain too.
Some fingering/position sequences and almost-worst notes
play circumstantial roles as well.
Some rarer fingerings/positions are worse than those shown,
but tend to also avoid flat keys.
A trombone's 7th position is the worst of the worst.
An F attachment/trigger alleviates this.
As French horn typically plays high in its range,
its usual worst fingering is relatively benign.
Have another usual note that you least favor
or instrument that would help to mention?
Please comment or edit.
This comes from a community band and orchestra member
who fills for whatever non-percussion parts are needed during rehearsals,
playing the most appropriate brass instruments
that happen to be along or available.