After working with IR for years, and observing numberless products, I conclude that the reason just: tradition, and a bit of aesthetics.
But with a caveat.
For receivers, the bandpass window is critical for rejecting the visible band: sunlight and bright room lighting. Even when using modulation, filters, and synch detectors, and with IR-sensitive silicon, your IR link may overload and stop working if used outdoors, or used indoors with sunbeams or spotlights. Ideally the wavelength-passband of the receiver's "black" plastic window should be very narrow and centered on the transmitter's spectral line emission. A visible-black dye might reduce the detector sensitivity slightly. But this is a good tradeoff for blocking the offband optical interference.
So, with no receivers present, some designers still habitually use the visible-blocking plastic. Gleaming black seamless enclosure, not transparent, no unseemly electronics exposed. And there's the ancient "IR windows are always black" tradition. But it's not necessary. And if the LED emission line isn't right at the peak of the window dye's IR passband, adding black dye might reduce the LED's output power.
Similar question: why are red LEDS in red plastic, green LEDs in green? And, why are IR LEDs black? Most IR sources aren't, not anymore. But some were, decades ago.
If given the option, I go with totally transparent enclosures, so all the PCBs are visible. I've found pocket radios and desk phones. Also, the 2010 special edition Livescribe Smartpen had a "see thru" cases. Of course the non-composite pure plastics may be less tough than their opaque counterpart with various admix materials.
But it's WORTH IT.
And besides, any fractures in the clear enclosure are immediately visible, and can be cured with a bit of #3 ethylene chloride solvent cement, or crazy glue cyanoacrylate. I still haven't bought a modern tablet, and I'd be a total victim if someone was selling a transparent-case version. Maybe I'll wait a few years for printer resolution to improve, then have a removed tablet case 3D scanned, and 3D printed with transparent materials.