The trespass question is somewhat more complex than it at first seems, and it does not easily come down to a simple "does it matter" style approach.
Firstly people using the railway as a walking route is something that is being discouraged world-wide in all developing, and developing Countries. Even some of the under-developed Countries are setting their eyes on this.
In the USA where public use of the lines used to be tolerated in a fashion, this has completely reversed in recent decades, and railroad land now comes under Federal Law which makes it an offence to be on the land, even if you are a long way from the line. There are no fences in the wids and some forms of fencing in urban and semi-urban areas.
Increasing train speeds have raised the risk to casual and indeed regular users, as has the use of personal stereo / MP3 / radio headsets and there are many documented incidents where people wearing them have been struck by trains. Permitting or turning a "blind-eye" to trespassing on the railroad has introduced the concept of the railroad assuming a much higher level of responsibility and liability towards trespassers who are wearing such equipment. It has also translated onto those who are less well mentally capable, as well as the aged, the drunk, drug-users, etc, etc.
Unfortunately the influence of American culuture (or should that be sub-culture maybe ??) being what it is, the concept of liability is so well ensconsed into the US society, that this is permeating outwards and influencing other Countries, especially those that are developing. The Claim Culture provides a good career for lawyers, and compensation offers those without anything the chance of bringing about life-changing opportunities.
There is also what amounts almost to a paranoia about a terrorist attack against the railroad system at Governmental level, and thus the Homeland Security Agency has been pressurising railroads into tackling trespass - for obvious reasons.
World-wide there is evidence of the rise of what I would call a sickness in society - an attitude of disrespect to authority and this can manifest itself in ways such as interference or damage to the trackside equipment, or even the obstruction of the lines. One of the railroads I work for has a big problem with indigenous people, who regularly use opportunity to obstruct the railroad as a means of exerting pressure on the State Government.
The increasing movement of goods by train, especially in the New World as well as the former Soviet Union and the developing world means that train delays can cause many problems, and a simple fatality can stand the railway for many hours whilst the local civillian Police investigate and collect evidence. Then there are the costs involved with the clean-up, train crew relief, sickness absence, and sometimes the losss of experienced drivers who no longer wish to go back on the footplate.
One of my client railroads is operating a clockface timetable of iron-ore trains which are just part of a massive production line. As one 3 mile long train is loaded. the next is arriving on the tail lamp. The whole seaport and deepsea shipping operation is based on trains discharging directly to the ship's hold, and like the train as soon as it is full, there is another empty bulk ore carrier standing outside the berth.
Delays on this railroad, whether through interference with lineside equipment, fatalities, or just delays caused by trespassers can have an enormous impact on the whole operation. With each trainload generating several million in local currency, you can see why their response is with an armed military-style Police force. Go to one of their yards and within minutes you will be surrounded by men with guns and high powered rifles loaded and happy to take you down if they think you are a threat.
Another railroad is moving millions of tonnes of bulk grain, and some very high value cargoes through some rough areas. They will respond with armed helicopter units and will shoot to kill anyone who appears to be running away or attempting evasion. I kid you not.
Whilst many of these examples dont apply to the UK they do however give an indication of the nature of thinking, even if the UK is on a lower scale.