This is referencing a very clear (and concise) Instructable by witnessmenow about how to use the WiFiManager library for ESP8266 to avoid hard-coding your SSID and password.
He makes some really good points about portability, and that is a really good reason to use this. As is basic user-experience. But this is also a good starting point for security. Especially if you have an outdoor device, like a temperature/humidity monitor, or something along those lines, these little IoT devices are physically vulnerable. If your credentials are hard-coded in, then it would just take a little bit of not-necessarily-B&E to get hold of them…and then a (obviously) malicious person has complete access to your network!
Security in IoT is something that has been really lacking, in a lot of places. Thinking of at least the basics could save you some headaches down the road. It’s a lot easier to plan on security and build it in, than it is to retrofit it!