good question. The passport maybe new or it would not be clear to the airline. The airline submits a list of names immigration - they get info back on who can’t be admitted
A big problem is when you have the same name as someone who is blacklisted. There have been to posts (one in this group) recently where people were falsely denied boarding because they had the same name as someone who is blacklisted. Airlines frequently act as immigration officers which usually leads to disastrous result.