Hmm whilst the situation is saddening for the family I'd be surprised if those sites had acted illegally for their advertising (deliberately). One site certainly sounds like they dealt with the issue by removing the ad (blocking it from the site) already. I think we'd honestly need more details about how the photos were acquired and under what contract(s) they were used. Could simply be a really bad case of random selection of a submitted photo to the site being used for advertising (all photos submitted can be used clause in the terms and conditions) and the backlash or could be that the marine put his photo up for sale/use. Furthermore I'd be very surprised if after they showed the ad if anyone on the staff were aware of the marines life outside of that photo - it was just an advertising image for them so a good chance that the news of his death was not something they were watching out for (and this didn't react to until it was flagged by the family).
Either way without those details the case could either be a case of the family (either deliberately or mistakenly) trying to claw money out of the companies - or could be the companies not using a sufficient vetting process for their advertising material.