Cabs were like any other part. When had a major shopping, the parts were all taken off, and sent to the appropriate departments for repair/upgrade. When the frame/boiler were ready to be reassembled into a locomotive, whatever parts were ready (pumps, cab, tender, etc) were collected and bolted on.
As I understand it, when generators were installed on the locos, the incandescent bulbs weren't bright enough. So Carbon arc lamps were used in the original oil lamp boxes. The headlight extensions came about because the arc lamp was melting the lens, or somehow damaging them. The answer was to simply move the lens away from the arc. Only locomotives that survived into the 40s got the later Pyle headlights. The pyle lights could very well have been castoffs from standard gauge locos that were being retired.
Hope this helps.