The reason why it stays working for a while is "DNS TTL", the Browser (or OS) does not request the same domain again until the dns lookup times out. DNS has a setting called TTL (Time To Live) and when you did lookup the same domain for shorter then the TTL setting it just takes the old entry. When the TTL expires, it looks it up again. Hence the reason why MarineTraffic keeps working for a while when you put back the Host file.
If you never messed with your host file and its default from windows, some software must have modified it.
The default host file has no real entries, from a clean windows 10, it has just these two and even those are marked out by the #
# 127.0.0.1 localhost
# ::1 localhost
Please be aware that several viruses/malware use the host file as a attack vector. For example, if i put this line in your host file, your pc will not go to marine traffic at all (it will go to google.com). This could also block updates for antivirus, or even redirect the a page to anywhere else.
If you did not change the file, or have no idea what software has done it, i would suggest to rename the file. (or copy it away for savekeeping)
To prevent it to be changed without your knowledge, right mouse, properties > mark read only.
The reason why the first two ships are working:
The site go to things like google analytics, scorecardresearch.com, po.st, gwallet.com, googletagservices,googlesyndication.com. Several of those are for ads, so that's why my host file, and (probably) yours, blocked them.
On the first two ships, it does not request all of them and that's why the first two show up
Warwick: the field might also be called "Name Server" (Dns stands for Domain Name System)
In all hotel OTE and Wind modems, i put the google dns. It saves many calls. Both OTE and Wind had periods that their dns server was running crap, then the clients get a message that the domain can not be found and start calling
There are several other nice DNS services, like OpenDNS, that can help with, for example, block adult sites for kids.