Not strictly true. A shopping centre or a museum could reasonably be called a public place, but many explicitly ban photography and have a right to do so as they are privately owned. This technically is also true on trains and stations, as most are effectively rented by private companies (TOCS) or owned by private companies (ROSCOS)
I was jumped on by security at my local shopping mall, after taking photos from a car park roof (of the surrounding roads, in a panoramic photo). [Edit, not literally the roof, rather the top level!]
They asked to see my photos and I politely refused, but complied with the request not to take more photos. They stated the policy was to protect against photos of children, which was a bit odd as I was taking photos in the multi-storey car park, not in the building itself.
I'd have understood if they were concerned about me jumping, something I didn't initially consider, but they were really big on the child protection angle - given they have an indoor play area.
Then, when I stated that point (i.e. how does that policy cover the car park), it became about security. It fell on deaf ears that these days, after any terrorist incident the police want photos taken by members of the public.
After a while, I got the details for the site manager and went to eat. I came back to be stopped by PCSOs that demanded my details and to see what photos I had taken. I gave my details but refused access to the phone. I then sat through a long talk about the terrorism threat level (lower than now) and once again pointed out that the police welcome photos, and now HD video, of incidents. Plus I wasn't taking photos of CCTV positions or anything.
What I didn't say at the time was 'why are you even asking me this on behalf of a private company which at best would have a civil claim against me?'. As is clear, it wasn't a police matter. I hadn't taken a single photo once I was stopped and agreed not to take more without getting permission in advance.
Showing my NUJ press card did however make them back off quite quickly.
Back to the railway, I was quite pleased to see signs at King's Cross after the Manchester bombing to say that photography was still allowed, but asking for people not to take photos of sensitive items (e.g. cameras, private/out of bounds areas). Sensible advice, as if anything else was to happen, photos and video taken could prove invaluable for future investigations.