I was playing around with some sketches where you enter your ssid and password and I had trouble uploading it with the Arduino IDE. So I decided to start from scratch and upload the firmware again.
I used these instructions https://nodemcu.readthedocs.io/en/latest/en/flash/
which sent me to https://nodemcu-build.com/ and I used the default and added MQTT. The image appeared to flash with the windows program. I was able to upload a simple hello world sketch and when I looked at the terminal I was shocked to see:
SDK:2.2.1(cfd48f3)/Core:2.4.2/lwIP:2.0.3(STABLE-2_0_3_RELEASE/glue:arduino-2.4.1-13-g163bb82)/BearSSL:6d1cefc scandone state: 0 -> 2 (b0) state: 2 -> 3 (0) state: 3 -> 5 (10) add 0 aid 2 cnt connected with HomeSweetHome, channel 1 dhcp client start... ip:172.16.68.234,mask:255.255.255.0,gw:172.16.68.1 pm open,type:2 0
It not only appears that my previous sketch uploaded, but some remnants of it appear to remain as it connected to my WiFi. What on earth is going on? Why didn't my flash wipe this out?
ETA: I was able to remove the WiFi settings through the IDE. Does this mean the WiFi component on the controller stores the router authentication information?