I believe the question you are asking is based on a mistranslation.
Since the hadith in question is long I'll quote here the most relevant part:
…وَإِنِّي مُخْبِرُكُمْ عَنِّي إِنِّي أَنَا الْمَسِيحُ وَإِنِّي أُوشِكُ أَنْ يُؤْذَنَ لِي فِي الْخُرُوجِ…
According to the sunnah.com, this translates to:
…I am going to tell you about myself and I am Dajjal and would be soon permitted to get out…
However, the chained person in the Arabic text is clearly quoted as saying "أَنَا الْمَسِيحُ", which is to say "I am the Messiah", not "I am Dajjal".
Assuming the quote is complete and accurate, they likely had no reason to believe that they were talking to "The" Antichrist as opposed to any other false Messiah that the Bible would've warned them about.