"Why put a light in a closet?" Ironically, a common thread in the 'home inspector' forums centers upon the inspectors' belief that lights are actually required.

I suppose it's a matter of design, and the size of the closet. Heck, I've seen plenty of closets that had multiple receptacles in them, let alone lighting. Personally, all I can do is observe that my current closet sure needs more light.

As for the flammability of mattresses, there have been some CPSC mandates over the years, where commercially manufactured mattresses are supposedly made less flammable - the old 'smoking in bed' issue. Such tests and standards are severely limited, and as far as I know there are not 'fire tests' or ratings as you might find for, say, a wall assembly.
A similar situation exists as to carpeting.
How useful are the standards? That's an entire new discussion. Suffice it to say that the matter is hotly debated within the particular industries even today - a good 40 years after the issue was first raised.

If the 'mattress' was simply a slab of foam from the local fabric store, you can be certain that it has the same ignition properties as a cup of motor fuel.

Over the years, I've dealt with several fires, on behalf of folks who never thought to buy an extinguisher. It's not that hard. Fire Department response is all well and fine, but that's no excuse for being completely helpless and unprepared.

The electric code is not the only code out there. The most commonly accepterd residential code has mandated that new homes have sprinklers installed in the 'occupied' areas of homes. As currently written, closets are exempt from the requirements. That detail aside, the 'sprinkler debate' strongly parallels the 'AFCI debate,' with many jurisdictions opting out of this requirement.

One of the parallels is that the various sprinkler advocated miss no opportunity to publicise instances where they can argue that adopting their rules would have saved the world.

Such emotional presentations overlook two very relevant aspects of the issue:
First, they ignore the multiple very foolish things that created the situation; and,
Second, they ignore the 'unexpected consequences.' For example, the increased regulation and cost will lead to needed work not being done, or being done illegally- often by unqualified persons.

As I stated before ... you can't fix stupid.