What OCR actually does, and why it fails the way it does
The OCR engine works in stages. The picture is converted to black and white with a threshold that has to guess where the paper ends and the ink begins; the dark shapes are grouped into lines, then into words, then into characters; a neural network - an LSTM, trained on millions of lines of scanned text - reads each character in the context of the ones around it; and a dictionary pass nudges the result towards real words. Nothing in that chain involves understanding. The recognizer does not know what a word means, so it cannot notice that "reciept" is wrong, and it will happily return a sentence that reads plausibly and says something else.
That is also why the failure modes are so predictable. Handwriting throws out the character shapes the model was trained on, so it is mostly out of scope - clean block capitals sometimes work, joined-up writing rarely. A page photographed at an angle gives the line finder a fight. Low contrast, shadows, a phone flash, thin fonts, text over a photograph, and print below about ten pixels tall all cost accuracy in the same way: the letters stop being distinguishable before the network ever sees them.
The confidence number in the results is the recognizer’s own estimate for the whole picture, and it is worth reading: above 90 usually means clean print recognized correctly, the sixties usually means something was hard - and it is a warning to check the text rather than trust it. Nothing here corrects, spell-checks or tidies what came back, because a tool that quietly rewrites your document is worse than one that shows you what it really saw.