Each photo can be included in multiple galleries; however, each photo gets assigned to a "primary gallery". This is basically the default gallery for the photo.
There are instances when a viewer may arrive at your site via a link direct to a photo page. In this case, the photo page may not know the gallery context for the photo, and so the primary gallery will be used and linked.