Your assumption is correct, when cleared 'direct to xxx' we do as instructed.
Talking of FMC equipped aircraft though two possibilities come to mind.
Finger trouble and executing 'direct to yyy instead of xxx' or more commonly if on a radar heading executing 'direct to xxx' and then omitting to select LNAV thereby disconnecting the HDG mode that the aircraft was previously in.
No excuse and poor airmanship but it does happen.