Here is a transcript of commands (and their output) that explains my problem:
/tmp/example $ shopt -s
cdspell on
checkwinsize on
cmdhist on
complete_fullquote on
direxpand on
dirspell on
expand_aliases on
extglob on
extquote on
failglob on
force_fignore on
globstar on
histappend on
interactive_comments on
login_shell on
nocaseglob on
nullglob on
progcomp on
promptvars on
sourcepath on
/tmp/example $ ls -R
.:
prefix_bar prefix_foo
./prefix_bar:
test.c
./prefix_foo:
baz test.c
./prefix_foo/baz:
test.c
/tmp/example $ ls prefix_@(foo/baz|bar)/test.c
prefix_bar/test.c
/tmp/example $ ls @(prefix_foo/baz|prefix_bar)/test.c
prefix_bar/test.c
Question: Why does bash ignore the foo/baz
or the pattern_foo/baz
portion of the pattern-list?
For the record, I looked around before posting this question and the question closest to what I am about to ask is bash extglob: Should the order of patterns in a pattern list matter? (and it does not answer my question).