Question about ect/hosts with ctf/hacking

I was working on the easy doctor box, and got stuck on the page. Normally I add a host in my file beforehand. After being stuck for 3 hours I looked at some writeups to give me a hint and all of them showed login pages in there web dir scanning that I never saw. so my question is: does it matter what the hostname is to access certain parts of a site? and if so why? if you want to point me to an article or book that would also suffice. Thank you for taking the time to help me :slight_smile: