When confronted with a child's unsafe, annoying, or inappropriate behavior, after trying some things, adults commonly conclude that a spanking is/was THE ONLY thing that would "get through" to him. They assume that the wildness and willfulness would have continued and increased indefinitely otherwise.
When we say that something is needed, we mean that it is required, with a certain amount of urgency. Something that is needed is the only thing that will do the job. Like breathing, for example, or a dialysis treatment: nothing else will do.
But if you spank a child, you don't really know if it's needed, because you will never know what would have happened if you didn't spank. You can't know what would have happened with effort, consistency, creativity, and a few weeks/months' worth of neural development. And I'm willing to bet that, once you give the "necessary" spanking, you are quicker to reach for that tool in the future. After all, it's required for that particular child. Nothing else could impact that child's behavior. Right?