Ive read this on the forum somewhere before.. i just cant remember where! when the core powers up the pins aren't initialized until the users program runs.. after it connects to the wifi and cloud.
This guy has a interlock so nothing gets effected during power off and boot up.