For a technical explanation, if we look at the disassembled code for Super Mario Bros, we can see that the routine for collecting fire flowers and super mushrooms is exactly the same.
HandlePowerUpCollision:
jsr EraseEnemyObject ;erase the power-up object
lda #$06
jsr SetupFloateyNumber ;award 1000 points to player by default
lda #Sfx_PowerUpGrab
sta Square2SoundQueue ;play the power-up sound
lda PowerUpType ;check power-up type
cmp #$02
bcc Shroom_Flower_PUp ;if mushroom or fire flower, branch
cmp #$03
beq SetFor1Up ;if 1-up mushroom, branch
lda #$23 ;otherwise set star mario invincibility
sta StarInvincibleTimer ;timer, and load the star mario music
lda #StarPowerMusic ;into the area music queue, then leave
sta AreaMusicQueue
rts
Shroom_Flower_PUp:
lda PlayerStatus ;if player status = small, branch
beq UpToSuper
cmp #$01 ;if player status not super, leave
bne NoPUp
ldx ObjectOffset ;get enemy offset, not necessary
lda #$02 ;set player status to fiery
sta PlayerStatus
jsr GetPlayerColors ;run sub to change colors of player
ldx ObjectOffset ;get enemy offset again, and again not necessary
lda #$0c ;set value to be used by subroutine tree (fiery)
jmp UpToFiery ;jump to set values accordingly
I would say this is intended behavior. If you somehow could get a super mushroom onscreen while you were Super Mario, he would turn into Firey Mario. Most likely, the rationale is to save space on the ROM.