Nicole - I've read (I have no more direct knowledge) that on the scanners they use, peanut butter looks like explosives, and will almost always result in your luggage being opened. If that's true, I could see how soap or caramels would be similar.
I used to forget to take out my keyboard. Since it's not a "computer," I don't think of it when they see it on the x-ray and keep asking me if I have a "laptop" in my bag. After a few incidents, I now remember to take it out.
Leaving Rome in 2014, they wanted all "electronics" in a separate clear bag they provided. The catch was, their definition of "electronics" included things like chargers and cords and headphones, which I had scattered all over my luggage. It took me a while to find everything; of course, had I known, I would have packed differently the night before.
The duct tape one is puzzling to me. But as I'm always telling people, this is why you have to get to the airport early, and you just have to go with the flow. The procedures are not only different at every airport, but change all the time.