I already understand and so ask not about this idiom's meaning. Though some idioms fail the Principle of Compositionality, this idiom seems to derive from imagery and so its semantic shift can be explained.
I am conjecturing that the 'beam' refers to a light beam, but is an outward beam biasing the hypocrite, or does the beam emanate from the hypocrite?