How Excel interprets what you type is almost totally independent of the cell
format (but see below).
One of the built-in rules regarding date entries is is that if you type a
month, a date separator, then a number that is a legal day of the month,
that's how it is interpreted. Since you've omitted the year, Excel assumes you
mean the current year. Changing the cell format doesn't affect any of that.
OTOH, if you type 5/2004, 2004 can't be a day of the month, so it's
interpreted as the year, the day of the month is assumed to be 1, and the date
you see in the formula bar is 5/1/2004
If you want 5/01 to mean the month of May, year 2001, you must type it as
5/2001, in which case the date will be recorded as May 1, 2001. Note that a
date must include all 3 parts: year, month and day. Excel does use some
defaults, as I mentioned above: current year if that's missing, 1 as day of
month if that's missing.
*The exception to my first sentence is a cell that's formatted as Text.