That is not the norm. You won't get charged for smoking in Copenhagen, but it will put you in a high risk category for smuggling so their typical response here is to search you. They were probably under a high workload and had to prioritize heavily.
They will always be under time pressure as the train needs to depart promptly.
(This is Swedish customs, nothing to do with identity checks. I don't use cannabis or socialise with people that do.)
However, there was suppressed to be a further push to end it. I haven't walked by Pusher Street since then.
News yesterday (Danish) https://www.dr.dk/nyheder/indland/den-her-gang-er-det-anderl...