,I mean, Madara said to Kaguya "Let's be one" in 2 different occasions (at least he Thought so, so he intended so)
So, I think BZ could just follow Madara and didn;t betray him, why? because Madara wanted to become one with Kaguya from the beginning.
After all, Kaguya absorbed Madara and...