In trains here i've never seen lighting operated from the traction power system, it always run via the battery system (like in regular cars, only the voltage differ: I have seen 24V, 48V, 60V - newer use only 24V).
On many rail cars the primary power come from an alternator (or dynamo) powered by the car movement - so not dependent on traction power source.
I guess one of main reasons is the broad variety of traction power used to haul trains (for such small country): 4 or 5 types of diesel locomotives, 3 electric power systems (mainly 25kV/50Hz and 3kVDC, on some places 1.5kVDC) with the common practice to lower the pantograph when the locomotive power is not required (coasting) - the only universal power source is then only the car movement, plus it need only two connections to be made: Hauling hook and brake hose (Europe still for more then 90years only argues about the automatic connection system standard without any conclusion ahead, so still using the nearly two century old and dangerous loop-hook-buffer system).