As pointed out by others, luminaires above or near a tub/shower must be "steam-proof" (rated for damp locations). This means the fixture will be sealed in some way, to prevent moisture from entering the housing and causing damage and/or an unsafe environment.
410.10 Luminaires in Specific Locations.
(D) Bathtub and Shower Areas. No parts of cord-connected luminaires, chain-, cable-, or cord-suspended luminaires, lighting
track, pendants, or ceiling-suspended (paddle) fans shall be located
within a zone measured 900 mm (3 ft) horizontally and 2.5 m (8 ft)
vertically from the top of the bathtub rim or shower stall threshold.
This zone is all encompassing and includes the space directly over the
tub or shower stall. Luminaires located within the actual outside
dimension of the bathtub or shower to a height of 2.5 m (8 ft)
vertically from the top of the bathtub rim or shower threshold shall
be marked for damp locations, or marked for wet locations where
subject to shower spray.
The major concern here would be corrosion inside the fixture, which can lead to dangerous heating, arcing, shorting, etc.
Corrosion on contacts increases the resistance of the circuit, which can lead to excess heat, which in turn can lead to increased resistance. Given the right circumstances, wires/contacts can be heated to the point of ignition.
Arcing and Shorting
In some fixtures, contacts can be in very close quarters with each other. If corrosion builds up causing the gap between contacts to reduce enough, arcing can become a problem. Similarly, if the gap closes completely, a short can be created.
Corrosion in fixture can simply lead to a frustrating situation. If the screw base of a bulb becomes corroded enough, the bulb could become difficult or impossible to remove. This could lead to the fixture needing replacement, or at least an annoying bulb change experience.
As we all know, water conducts electricity (in most cases). Because of this a deadly ground fault situation can be created, if luminairs are allowed to get excessively damp or wet. If enough moisture enters the fixture to cause dripping, a solid stream of conductive water could bring electricity within reach of a well grounded individual. In this scenario, a simple touch of the light could be deadly.