Like if you completely cut off sugary foods for 2-4 weeks you won't crave them as much. Why? The gut flora that feeds off sugar specifically dies off and can't send as strong signals to your brain.
Thus: gut-brain axis. It's a thing and will become more important when we study it more. Your brain isn't as much in control as you think.