Although I've only seen such things in games rather than in professional software, the same principle could apply to both: if the program is not altered, it will either behave correctly or refuse to run at all, but attempts to alter the program to bypass the protection will cause other parts of the program to occasionally malfunction in possibly-subtle ways. If one uses a compiler and linker that can treat values of the form someConstant+(uintptr_t)&someObject
as link-time-resolvable constants, one can arrange things so that the parts of the code that use easy-to-find copies of addresses will automatically be kept synchronized with "hidden" ones every time the program is linked, but someone who tries to patch the machine code would cause the copies to get out of sync.
Even here, I would think going for subtle behavioral variations would be a bad idea, because people might equate flakiness of a pirated version of the code with flakiness of the original. On the other hand, it may be good to write such code in such a way that it will often work for awhile, but occasionally fail with a report that it has been tampered with, using code written in such a way that someone encountering the message would have a hard time finding the code that produced it.