With parents, I am guaranteed to get 1/2 of your genes from one, and 1/2 of my genes from the other. My children are guaranteed to get 1/2 of my genes and 1/2 of their mother's genes. But when I pass half of my genes down, it is not guaranteed that half will be my father's and half will be my mother's. I could pass 3/4 of my father's and 1/4 of my mother's. And my next child might get 1/4 of my father's and 3/4 of my mother's. On top of that, my children may (read WILL) not get the same genes passed from my father and mother. Those two children may not have ANY genes in common with each other. If they both tested DNA, both would match 50% with me, but compared to each other could conceivably test 0%. Statistically, that is improbable, but the further down the tree you move, when the statistical percentages become much lower, then the actual percentages could deviate significantly.
Now in your example of the person who SHOULD be a third cousin because of how much you share but you cannot find a shared family surname, you must remember that actual parentage and assumed parentage in three or four generations of all children may not always be the same. (This is referred to as a "non-paternity event" clinically or sometimes "cheating" socially).
This article https://isogg.org/wiki/Non-paternity_event#Historical_NPE_statistics has some interesting statistics on NPEs.