Presumably FB didn't actually show pictures of deceased relatives but pictures from when they were still alive
Facebook showed images that had been uploaded by users. They have no idea what those images depict.
I don't understand why folks here are having so much trouble with this. People post content to Facebook. Facebook has extremely limited information about that content - basically the count of "likes". (They could apply heuristic methods like sentiment analysis to the comments, but I've done work in that field, and the state of the art is really not sufficiently suitable for this purpose to eliminate the problem described here.) Based on that extremely limited information, they decided they'd automatically select ("curate") some content to throw back at users. That was a dumb idea, and it was handled poorly (the "great year" tagline).
Facebook doesn't have enough data to implement something like this well. It'll always have a high failure rate. Even human judges wouldn't be able to select an innocuous collection of memorabilia in a significant number of cases.
As for chastising people who posted images they found painful in the review - that's a whopping failure of imagination on the part of the critics. Many people use Facebook to share experiences they find meaningful with family and friends; in that context, sharing a painful image is perfectly reasonable - and having Facebook throw it back in your face at the end of the year is not. And in many cases the images won't have been painful when they were shared (before a loved one died, for example), but may be now. I realize many Reg readers find other human beings mightily puzzling, but perhaps they should STFU rather than criticizing them.
Personally, I dislike Facebook and maintain an account only to receive the occasional event notification and the like. But I'm not so arrogant as to presume anyone who does use it is an idiot. (And I'm pretty damn arrogant.)