This smells like a feature built 10+ years ago, before notifications existed in Mac OS X, that never got upgraded.
That's how apps "notified" back then.
That's how apps "notified" back then.
Polite apps would just bounce their dock icon rather than stealing focus, however.
Mail.app and most other apps since 10.8 (?) introduced badges just use those, unless it’s a more urgent thing than “you have a new message” in which case, yes, it will bounce the dock icon.