The railways aren't like trainsets - the running lines themselves aren't electrified. Power is supplied either through overhead lines in the case of the West Coast Mainline (WCML) and East Coast Mainline (ECML) or through a third rail in the case of many suburban lines, especially around South London. In any case you can't electrify the main running rails due to the fact they have vehicles with metal wheels and axles running on them, causing short circuits. Why not remove the shorts by insulating the axles? Well, modern signalling uses defined sections of track for containing trains and in order to indicate whether a section is occupied a small current is passed through the rails (not enough to harm or power equipment) and when the train passes over that section a circuit is created and a light turns on in the signaller's console.
Signals and motorised points (or "switches" if you're American) require quite a bit of power to operate.
The railways are very old, cover 12k miles and the infrastructure lasts a long time and costs a lot of money. Replacing all that legacy cable with fibre is going to take a long time and a lot of money.