If I were in charge of locomotive portholes, it would never have happened. (Oh, well . . .) There are light bulbs inside the engine room, and, if all the lights were in working order, I guess they would have sufficed. For cash-short railroads like Rock Island, PRR, Milwaukee Road, B&O, Erie-Lackawanna, it was a way to eliminate 8 maintenance items per E-unit.
With earlier E-units (which were built with rectangular engine room windows) the cooling system was inferior to the electric fan driven radiators of E8's, and most E3/E6/E7 units had some panel louvers added, which replaced some or all glass side windows. That was a performance issue primarily, and secondarily financial for some roads. Some -- not all, as it was optional -- E8B units had hostler controls in the engine room, to enable moving the unit independently within maintenance facilities. On those units, the hostler controls were on the wall adjacent to one of the hinged portholes. The hostler had to open the porthole and put his head outside to receive hand or lantern signals for movement.
You may notice that solvent railroads normally left the portholes, and the daylight they brought into the engine room, alone.