Wait a second, I have a small guess as to how it works, but I dont really know what I'm talking about ahahah.
I think that if its in the hosts file, that if I try to go to the website it will make a request internally instead of trying to request from the actual site. Is this correct?