When you board the Eurostar to/from France, also on long-distance and high-speed trains in Spain, all passengers must go through a security checkpoint before accessing the platform.
This process involves: Luggage Screening: All luggage, including hand luggage, is passed through an X-ray machine, similar to airport security but typically much faster and less stringent (e.g., no liquid restrictions). Personal Screening: Passengers generally walk through a metal detector arch.
I guess this is a result of risk assessment (eg Eurostar are trains through channel tunnel, internation border, so obvious reasons; in Spain i guess its following a past train bombing (the 2004 Madrid train bombings) and as a way to help prevent future terrorist attacks
If more attacks happen in UK, we may see this happen in future, pretty impossible to police all trains and all stations, but could be for the main intercity lines..