I once wrote a reply email to an Amazon recruiter saying effectively, "If Amazon were the last software company left on earth, I would rather become a carpenter than work there. Please never ask me to interview there again."

Anyhow a couple years later I got called by a recruiter from Amazon asking me if I'd be willing to relocate to work there.

I had a similar experience with Facebook, although my email was much more aggressive (this was when their recruiter contacted me right after I got tripped by one of their UX dark patterns in a way that translated to real world harm). I kept getting invites until I put a clear statement expressing my desire to never ever work for Facebook into my LinkedIn profile

FWIW I think it's because recruiters at most companies are effectively contractors and don't have access to all history of communications.

Well the guy was technically in line - your conditional wasn’t satisfied.

I think I wrote an email along those lines, at some point, although it was as much annoyance with the persistence of a particular recruiter as it was a desire not to work at Amazon.