A notary public is, in short, a trusted witness. They are appointed by the state, most likely the governor after fulfilling state requirements.
They are often employed by a third party contracting company to witness the signer signing documents. The reason companies go third party rather than 'in-house' is because of liability reasons. What if notary public Bob Smith says the bank he worked for demanded that he stamp a document or he gets fired? What if instead of getting fired, they offered Bob Smith a big bag of money? In this example, regardless of whether this had happened not, this is a massive liability and puts all documents that their own in-house notary overviewed at dispute. In other words, they need to rely on unbiased notary publics who have been employed by a third party.
Because fraud exists, notary publics should keep diligent notes about all signings they witnessed. Additionally, they should make sure that the signer actually is who they say they are. Finally, notary publics should make sure that the document the signer is signing aligns with factual information about the signer.
A personal anecdote: I was contracted by a contracting company to overlook a signing that wasn't actually so far from where I live. I did the (irritating) rigmarole of 'signing' up to their company and finally was allowed to do my job. I called the signer to make sure that the information the company had given me was correct; what time and date that I should show up, that their name IS their name and that they should have reliable forms of identification 'on-hand'. They confirmed with me, I confirmed with the company, and they allowed me to print the papers. I quickly glance over the papers to make sure the PDF file they wanted me to print did not have deformities and that the document looked correct. It is bad practice and a waste of time to read every line of the document because you are just a witness, not a lawyer. Everything looked good to me. When I began the signing with the signer I noticed something that would render the entire document invalid: the bank got the gender of the signer wrong. I confirmed with the signer that the gender on the document was incorrect. I called the bank (in the middle of the signing) and they told me (after about an hour of waiting for them to call me back) to scratch out female and write male along with my initials. Afterwards, I took pictures of the signers valid identification and sent it to the contracting company along with a scanned copy of the entire document. Finally, I mailed the document (with a printed out copy of the identification) according to their instructions.
In my anecdote, I demonstrated attention to detail which notaries need to have. What if I did not notice and stamped anyway? What if escrow and the bank did not notice either and approved the document? Down the line someone notices and now the document is invalid and lawyers have to get involved. Who is at fault here? Me, the notary who literally witnessed the signing? The bank who misgendered someone? The signer who did not notice the document had described them as a woman? What would happen to the money that got exchanged? Would the signer need to give it all back? Does the bank simply take the loss? I don't know but I am glad that I caught that mistake.
This document is a reflection of the authors opinion and should not constituted as an authoritative source on this topic: consult an attorney who has been licensed to practice law.