We have a lot of old photographs from the Old Country that show family gatherings around an open casket, so apparently it was still a thing for the Irish up through the 1920s at least. They were also … not particularly well off, so sometimes I am imagine them thinking “oh, well we couldn’t afford a photographer for a random, happy event … but yes, definitely let’s shell out for one when Great-Aunt Mary kicks off, and we’ll get the whole family in the picture while we’re at it.”
And a while back, when an older uncle passed away, it turned out that all of my great-grandparents’ great-grandchildren happened to be able to attend. A lot of us were in college, and weren’t always home at the same times. So when our moms realized that all kids (we were more like young adults) were present all at once, and there was a lot of “OOOOOOH, we have to take a picture!” When we were little kids, we used to have to line up in order of age to take pictures, so we dutifully did it again … right there in the funeral home and you can see the casket in the background.
So that was classy.
I don’t know if I’d specifically take a photo of a dead person, but coming from a large family, we do tend to treat wakes and funerals (especially of older people, who died of old age related-things) like family reunions, and those involve pictures. I wouldn’t think it was weird at all if someone found some comfort or even simply family history interest in taking a picture.