Personal approach ...
Yes, that's exactly what is being suggested. If one knows the Moodle is to be accessed from the globe, setting up local DNS first with the same fully qualified domain name that will eventually be in the outside/public DNS will assure no issues with install, development of content (links to images as an example), etc. Same is true of remotely hosted IF provider will allow setup of a DNS entry BEFORE a service/server is actually present and responding.
Installation creates the config file from how one accesses the Moodle upon installation. Documentation for installing on Windows shows checking via http://localhost ... which will work on any machine, but if that's how it was installed, that's what gets written in the config.php file.
Probably best, once the Moodle is ready to install, to finish the installation from a work station as that would force the use of DNS.
Moodle uses full addressing when linking to images and other content. So if DNS is setup in advance of install and especially before development of content, then there will be fewer issues in bringing up a new server.
If entity not ready for public access, then port 80 is not opened to the internal machine until it is ready for public viewing.
All platforms have a 'cheat' to DNS. All know that the loopback address (127.0.0.1) is localhost. Windows still has lmhost and can be told to check that file first before making queries to DNS. Linux and MacOSX have a host file which can contain other IP addresses with fully qualified domain names of other servers. In Linux, think most distros have DNS resolving setup to check the host file first, then make queries of whatever DNS server it's pointed to. Think the same is true of MacOSX.
Have used the above approach for installing 'oodles' of Moodles and it's proven, for me, to be the 'better' approach.
'spirit of sharing', Ken