The "randomly generated hash" by 8chan is just the SHA256 of the file contents. Someone saved the file off 8chan, then re-posted it unmodified i.e. same SHA256 hash.
Here's the best example I have…
Run a SHA256 of the flag Q posted first time.
archive.4plebs. org/pol/thread/149158110/#149160361
Now check "random" file name of recent post.
You'll see the SHA256 of the original matches the "random" name of the second.
However… if you run the SHA256 hash of the second image, you'll see it has changed, presumably because 8chan uses maximum compression (because PNG is lossless).