It is human nature to be attracted to something we’re clearly instructed not to go near.
A child walks into the kitchen, minding his or her own business, looking around, completely oblivious of the piping hot dal lying on the table, right up until you tell him to not touch it. He knows that something dangerous now exists in the vicinity. That doesn’t necessarily make him lunge at it but it rouses his interest, and will make him want to inspect it. This isn’t about right or wrong. It’s about instilling the knowledge of things and more importantly, fear, from a very, very young age.