Your project may be transparent or not transparent. A transparent project is able to have its bottom layer background transparent, when non transparent ones can't.
Other layers that are not the bottom one will always be able to have the background transparent.
Whenever you enable transparency, all the pixels on bottom layers that are the same as the secondary color will be treated as background, turning them all transparent.
Likewise, disabling transparency will turn all the transparent pixels on bottom layers into the secondary color.