If you have photos on Facebook that can be viewed by Everyone, and if a person who is using Facebook can view it and click Like, you can easily see the mutual friend between the person who liked the photo and you in your notifications.
You really don’t have to go to that person’s profile to see who is the mutual friend and how did they get to your profile.