Security does not equal customs. Security tries to find out if you want to blow up/hijack the plane, customs tries to find out if you want to evade customs/smuggle items into the country. Hence why security checks occur on departure and customs checks on arrival. Customs checks are also not the same as immigration/passport control though they often are grouped together. Pet peeve of mine when people get them mixed up.
I only had a thorough customs check once - when crossing the German-Polish border by car about 15 years ago. Having a trunk full of stuff coming back from Poland must have looked a bit suspicious.