How does NVDA recognize table header from untagged pdf


I had a doubt regarding table headers, How does NVDA know the table headers of complex tables if they are not defined in pdf structure.

For structured pdf, tags aid for recognizing the headers, but even when they aren't present, NVDA correctly picked headers!!
Any explanation on how parsing or code works is welcome