Only if they're in the way or disrupting something.
I don't think it's automatically about attention or vanity, it can also be about fear of forgetting or just wanting photos.
I remember when I realized there were years with photos of everyone but me because I was the one taking photos, I decided I might as well take photos of myself...