Basically anything is a compromise.
Notaries are essentially a (relatively) low-friction compromise between just trusting that the person who put some squiggles on a piece of paper is who you think they are and that person traveling to a lawyer's office (or a brokerage etc.) that may be in another state.
Same way you can hopefully get a locked computer account restored without traveling to a Google office in Mountain View between 1 and 2pm on a Thursday to make your case with multiple forms of ID.
The rigor depends on the transaction but usually it's chosen to be a reasonable compromise.
To the specific example of a contract etc., presumably the lawyer has a copy of the original document and that's probably considered canonical in the case of a dispute. There can be edge cases obviously but there are edge cases with everything.