Even in the Soviet era, Ukraine was known for scientific, engineering, and industrial talent. Under the brutal exigencies of Russian invasion, these are now harnessed to national survival. The Ukrainians prefer Western weapons and equipment that permit innovation and adaptation to local needs, and they have proven to be quite good at it. For the US and NATO, valuable lessons are being gained as to how well their weapons and tactics perform in combat against a near peer adversary. Whatever else can be said about the war in Ukraine, it is a valuable beta test of sorts for Western weapons, materiel, and tactics.
I believe that the factories in Ukraine previously had manufactured the lens for Russian militarily equipment.