Plastic bags are made of polymers. Polymers are long strands or chains of molecules that are highly flexible. When the sharp objects go through the plastic bag, they push through the polymer chains, but don’t break them. Instead, the chains or strands of molecules stretch to make room for the pencil or skewer and re-seal themselves around the sharp object. This prevents water from leaking out of the bag.
When you pull out the pencil or skewers from the bag, the molecules cannot cover the big hole left behind. This causes water to leak out of the bag.