I have two domains, Domain1 and Domain2. There is 2-way trust between them. Users are connected to Domain1 while SharePoint is installed on Domain2. I have enabled that setting so people picker reads data from both domains but for some users, it doesn't pick their user from Domain1.
Here is one case I encountered today.
1. A new site collection is created 2. User@Domain2 is added to Members group. User@Domain1 is not appearing in people picker so couldn't add it. 3. When same User@Domain1 tries to access the site then he gets that error "Sorry this site hasn't been shared with you". So, he fills out that form on that page and sends request for access. 4. When I go to "Access requests and invitations" page in site settings, I can see that User@Domain1 request is there. 5. I approve his request and now User@Domain1 is also added to Members group. Which means now both User@Domain1 and User@Domain2 are part of Members security group. 6. He is able to access site successfully BUT his User@Domain1 is still not available in people picker when I try to search it. Only User@Domain2 is appearing.