Honestly, it’s more to please the men than to please the gods.
Usually those funeral strippers are more common in rural areas. Small towns and village used to be based on agriculture and the village’s festival is linked to the local temple. The local temple usually host the important festival and celebration and they are the rare entertainment the town people and villager have. So in addition to formal ceremonies and stuffs, some of them host a feast for the men too, and of course they hire naked women dancing in front of them, since they are not easy to come by in the old days, no tv nor internet, you know (and never mind whether the female family members at the scene feel uncomfortable or not, yeah, it all came down to patriarchy, really)
So the habit also spread to funeral events, and not only it’s an excuse to see sexy naked women, the main purpose has became to show off, because the bigger the dance group, the richer the host apparently is, and respecting the dead and gods are only an excuse.
Most younger people consider this “tradition” low and won’t do it, but some older generation still do it *shrug*