Erasing on a layer doesn't really give you black or white - it removes pixels from that layer to reveal whatever is on the next layer down. So you probably had a Background that was white, so on your layer above the Background when you erased its content you revealed the white of the Background. If your Background had been black you would have seen black.
As you discovered, the black/white toggle does work on Background.