When the PDF is very clearly structured it's working just fine. But let's say the layout consists of multiple columns and complex formatting the output gets very imprecise. If the material is scanned it won't function at all.
Hence most (if not all) programs export the text in the order they appear in the file.
And if it is scanned, there is no text at all (but you could OCR it).