wewire2:

From 2014 NEC...
410.2 Definition.
Closet Storage Space. The volume bounded by the sides
and back closet walls and planes extending from the closet
floor vertically to a height of 1.8 m (6 ft) or to the highest
clothes-hanging rod and parallel to the walls at a horizontal
distance of 600 mm (24 in.) from the sides and back of the
closet walls, respectively, and continuing vertically to the
closet ceiling parallel to the walls at a horizontal distance of
300 mm (12 in.) or the width of the shelf, whichever is
greater; for a closet that permits access to both sides of a
hanging rod, this space includes the volume below the
highest rod extending 300 mm (12 in.) on either side of the
rod on a plane horizontal to the floor extending the entire
length of the rod. See Figure 410.2.
410.

My opinion is that the fixture is to be far enough away from any combustible materials that could be ignited by the heat generated from the fixture. The 'hot' parts that you refer to are supposed to be contained by the fixture, as bare bulbs are not allowed.

And yes, I have seen some really 'packed' closets, and some really scary means of illumination.


John