Not a stupid question at all! 404 is the real, official designator (Factory 404) established in 1958, long before the web existed.
The coincidence with the HTTP error code is purely accidental, yet incredibly poetic—because for decades, this city literally could not be found on any public map.
My first guess would be that they at one point decided to use numbers to designate locations instead of names, to make it easier for them to be secret (eg "codenames"). Then at one point someone figured that actually, lets not just thoughtlessly increment the numbers, but pick random numbers between 1-1000 so we add even more confusion. Kind of like Seal Team 6 I guess.
The coincidence with the HTTP error code is purely accidental, yet incredibly poetic—because for decades, this city literally could not be found on any public map.