Why my object change material when using node shading I made a simple object (one cube) and assigned the color to face that i wanted as follow (photo 1)
I turn on the "use node" in material tab and named it "Top and Bottom" respectively
Then I opened node shader and click the material slots
The material previewed in viewport interchangeably as I click different material slot in node shader. (photo 2)
If I bake while this happened, it's directly bake like this (photo 2)


I'm not understand why it happened even though I assigned the material? Is this normal? Why it happened?

enter image description here
Hope it'll help somebody out there, i already found the answer after messing around with it. So here what I found
Clicking on the material names in the node editor will also change the material of whatever is currently selected (or the group of vertices that have been assigned that material).
If you want to edit different materials in the node editor that are all part of the same object you can use the "Slot 1" and "Slot 2" options to the left of the material name.
TLDR; it changes if you select (material icon), it'll changed whatever the material. To change anything in node for material (in green box). It'll make the baked texture remain as intended.