This is a remnant of the COMECON era when a number of Russian gauge (originally 5ft/1524mm, nowadays normalised to 1520mm) lines were built beyond the Soviet border to facilitate "exports" to the Motherland. The best known was to Katowice in southern Poland with a similar line to Kosice in what is now eastern Slovakia, both of which were primarily for steel exports. There were also shorter cross-border links to facilitate other traffics while preventing any possibility of "decadent" western rolling stock penetrating the USSR. The best known is to Zahony in eastern Hungary. The Przemysl line is another such link.
Since the end of the Soviet empire various attempts have been made to provide passenger services over what were predominantly freight-only routes with little success. Proposals also surface from time to time for extension of Russian gauge much further west to places like Berlin and Vienna but these appear to be little more than pipe-dreams.
It's also worth noting that Russian gauge is the standard for railways in both Finland and Mongolia.