I wrote a "Hello world" type of sketch using the Arduino IDE and uploaded it to an esp8266. I used no libraries, or any kind of WiFi commands. However, when I powered up the esp8266, it was visible under "available connections" when I connected to WiFi using a Windows laptop. I was told that the firmware on an esp8266 (which has the AT commands) is being flashed when the Arduino IDE uploads a sketch. Why do I still see the esp8266 when my laptop connects to WiFi?
It's because you don't actively program the WiFi - you just give instructions to configure it, and those instructions are stored elsewhere in flash, separate to a sketch. The WiFi code is always included and always running regardless of what you include or don't include in your sketch.
Uploading a sketch doesn't replace those settings, and so they remain.
To change the settings you will need to write a sketch that specifically changes them - maybe set it to STA mode, for example.
If you want to completely blank the ESP8266, including the WiFi settings, there is an option in the Tools menu in the IDE to Erase Flash.