This is very crude. People these days are apt to assume that what is appropriate in one social situation must be appropriate in another because the authentic person never changes, and that, if it is perfectly all right to dress like a slob when relaxing unseen at home, it must be all right to dress like a slob at a funeral.
Funerals have been playing an increasing part in my life of late (after deep reflection, I have come to the conclusion that it might have something to do with my age), and I have noticed that the more supposedly sophisticated the attendance, from the cultural and intellectual point of view, the more informal its mode of dress at the ceremony. People in the provinces still try to dress up at funerals, and though they might look slightly uncomfortable in the dark clothes that they never otherwise wear, and that have obviously played host to moths for some considerable time beforehand, I have been moved by their efforts. By contrast, the casual, more metropolitan funeral appalls me, as if the participants believed that a lack of sartorial effort were a sign of intellectual subtlety and sophistication. Perhaps, though, it is a kind of whistling in the wind, an attempt to convince themselves that, after all, death is not so very special, nothing much more, in fact, than popping down to a convenience store to obtain something that they had forgotten to buy elsewhere.
Another possible explanation of the refusal to don more dignified attire is the desire to remain not forever young, but forever adolescent. Ever since the 1950s, adolescence has been regarded as the peak of human experience, and everything afterwards downhill. If adolescents dress in a certain way, then dressing in a certain way keeps you adolescent: false logic, of course, and an example of magical thinking. Superstition springs eternal.