Why would I use 2N3904 instead of 2N4401?
There may be good reasons for choosing the 2N3904 when working at lower current. The 2N4401's higher current capability comes at a cost - higher capacitance and much longer turn off time at low current.
Emitter-Base Capacitance:-
- 2N3904 = 8pF
- 2N4401 = 30pF
Storage time:-
- 2N3904 = 200ns @ 10mA
- 2N4401 = 225ns @ 150mA
I use the 4401/4403 as my jellybean go-to transistors when it doesn't matter, and most of the time it doesn't. As you say, the 4401 and 3904 have similar specs, but there are differences. The 3904 is better at really low currents, but the 4401 can handle higher currents.
Most of the time the 4401 is good enough, so I "standardized" on it since it's more robust and I run into 100 mA applications more than 100 µA applications.
Once you pick something as your jellybean part, you want to use it whenever it's good enough. You don't want purchasing and manufacturing to have to deal with more different parts than necessary. Personally I think the 4401 is a better choice for this since it will be a fit to a few more applications than the 3904, at least for the things I tend to do.
I therefore don't use a 3904 at all. In the relatively unusual case where I need a lot of gain at very low currents, I'll use something else even more suitable. The 3904 is just too close to the 4401 that I use in volume to be worth stocking.
If you decide on the 3904 as your jellybean NPN, then you might still use a 4401 when you need more current than the 3904 can handle, up to a few 100 mA. That's because the 4401 is a really cheap part in that current range. Beyond that, you're going to use something else, probably a power transistor, anyway.