Phones used to work like that too. I think all my feature phones and first Android phone worked if it was plugged in with the battery removed.
It did also run when plugged in with the battery removed, which is good 'cause the battery eventually failed. So this way I can still run it.