I think sometimes it can be management putting pressure on others. My interests extend beyond ships to shipping and following 9/11 and many sea ports started being treated in same manner as airports and suddenly quaysides became out of bounds. Quite a few ports issued photo (and fishing passes) to those who wanted to enter but that all came to an end in the early naughties. Though fortunately where I am located it became possible for the local branch of the World Ship Society to negotiate some concessions with regard to members at the local port - but there were several years between 2003 and around 2010 when we could not enter.
However, during the in between period there were several locations one could just enter as there were other businesses located there. Thus when a particular ferry was moved to an accessible location one afternoon three of us walked in took a few photographs but then had a chat. As we were talking a Port Police van drives up. Bobby gets out sees our cameras and said something along the lines "I can see you are not doing anything other than taking photos - but I have been sent here because you have been seen on that camera - which he helpfully pointed out and I have been asked to move you on." He was almost apologetic about it. As we wandered away - he then said "Next time come in quickly get your photos and leave before anyone sees you!" - He was very decent about it.
Around a year or two later our local WSS Branch had been invited by the local RNVR to visit a warship which was located in another part of the docks. Thus we legitimately entered and had a visit to the said warship the officer on duty who had shown us around gave us permission to take photos. After disembarking we took some more from the quayside. Then suddenly entering the scene at high speed was a port police van. The officer jumped out yelling and screaming at us. Now were were a group of approx 12, 35 to 70+ year old adults. His shouting and screaming didn't impress. We turned around and told him we had permission and if he didn't believe us go on board and ask.
Realising he would be put in an a difficult position as our claims would obviously be confirmed he then started lecturing on us about health and safety and why it was dangerous to be there so he went from being concerned about security to being bothered about health and safety.
Just an example of how two employees of the same private police force can have two different attitudes to the same sort of situation, the second guy was clearly a jobsworth. It prompted one of our members to write to the local RNVR commander about what had happened. He then contacted the port police and we never did have any more problems with photography on visits to naval ships.
Just going back to railways - and inhospitable locations for photography - any one had problems at Heysham Station which is shared with the Isle of Man Steam Packet Company. They can be very anti-photography which appears strange.
This photo I took of a coach stuck on the concourse due to striking the roof caused a bit of a fuss back in 1999. All disembarking vehicles pass across the end of the station platform.
Heysham Terminal Incident | At the present time with all the… | Flickr
John