"If he had come yesterday, he might have seen his sister."
This sentence implies he didn't come yesterday and didn't see his sister.
"If he has come YESTERDAY, he may have seen his sister."
İ know that i cannot use this sentence with YESTERDAY to imply that i don't know whether he came or not.
Why is it possible to use it with past perfect, when I know that the action didn't happen and I imagine an unreal situation about this past action ?