Used all the time, the effectiveness will be lost. Not if we want to improve a child's behavior. Spanking often increases the very behavior that we are trying to stop. Kids will do anything for attention, including something that will result in a spanking. That is why young children will repeat the offense.
Kids like to watch parents get upset.
It relieves boredom. Think how much power that gives a child over a grownup. All two year olds are power hungry creatures. A reasonable approach is to give a two year old plenty of attention when he is behaving appropriately and to remain calm when providing discipline. Parents of toddlers need breaks in order to maintain sanity and patience.