Also, the effect can be oddly useful sometimes.
The layers in a map are properties of the map, and it can be useful for the map to remember what layers are in it even if you remove one of those. Why? Because when you add that layer back in, say, by copying and pasting from a different session the layer magically appears exactly in the stack as it should.
The use scenario for that is where you discover you have an old version of something participating in a project, so you delete it right away. Next, you open the correct, new version of that in another session, perhaps where it participates in a different, newer project, and you copy/paste into the project from which it has been deleted.
Because maps "remember" their layer structure all the maps that used the obsolete version that you deleted will still have that layer and the new version will appear in place. If you had 100 maps in the project that's a big deal and a lot of saved effort.
The effect can also be useful when shuffling around different Styles. Suppose you have a table with two or three geoms in it and several dozen different drawings made from those geoms using different Styles (what used to be called Themes). It's often the case that you might change your mind about which of those you want to appear in maps, so as you delete/rename them in various combinations it's very convenient to have maps remember what layers they should be in.