Seagulls eat clams. They break the shells by dropping them onto rocks from a height. They're able to learn to steal food from other birds when they see a chance, and conversely, to regulate from which height to drop clams of different sizes.
All of these require planning and risk assessment abilities. Being able to take a bag of potato chips away from human-infested buildings and opening it is not really that far outside the scope of their adaptations.
Still, crafty little bastards they are indeed.