What's important is a controlled process that attaches this photo to a hard-to-forge token, such as a passport or other identity document. It confirms that some designated clerk looked at the photo and at the person, and also at other documents confirming the identity of that person, and maybe asked questions to make sure the person is who (s)he alleges to be.
That photo is for reference only, and is worth next to nothing without the identity verification process above.