That'll teach me to go by the tempting mental picture! Having found illicit canon online, I see the actual scene is:
Hagrid seized his umbrella and whirled it over his head, "NEVER," he thundered, "- INSULT- ALBUS- DUMBLEDORE- IN- FRONT- OF- ME!" He brought the umbrella swishing down through the air to point at Dudley -- there was a flash of violet light, a sound like a firecracker, a sharp squeal, and the next second, Dudley was dancing on the spot with his hands clasped over his fat bottom, howling in pain. When he turned his back on them, Harry saw a curly pig's tail poking through a hole in his trousers. Uncle Vernon roared. Pulling Aunt Petunia and Dudley into the other room, he cast one last terrified look at Hagrid and slammed the door behind them. Hagrid looked down at his umbrella and stroked his beard. "Shouldn'ta lost me temper," he said ruefully, "but it didn't work anyway. Meant ter turn him into a pig, but I suppose he was so much like a pig anyway there wasn't much left ter do."
In other words, attack the fat boy even though he did nothing to warrant it. Gee, that's nice, and, coming from a fat man, bordering on the hypocritical. All I can assume is that Hagrid's somehow got word of the number of times Dudley has bullied Harry in his life (the phrases "He'd spent his life being clouted by Dudley", "chased by Dudley's gang" and "Dudley had always been able to kick him around like a football" occur just a couple of paragraphs before the pig's-tail attack) and decided payback was due. Besides, nothing like attacking A's worst enemy to make A believe you are A's friend! :-)
Re: Devil's Advocate Time
Hagrid seized his umbrella and whirled it over his head, "NEVER," he thundered, "- INSULT- ALBUS- DUMBLEDORE- IN- FRONT- OF- ME!" He brought the umbrella swishing down through the air to point at Dudley -- there was a flash of violet light, a sound like a firecracker, a sharp squeal, and the next second, Dudley was dancing on the spot with his hands clasped over his fat bottom, howling in pain. When he turned his back on them, Harry saw a curly pig's tail poking through a hole in his trousers. Uncle Vernon roared. Pulling Aunt Petunia and Dudley into the other room, he cast one last terrified look at Hagrid and slammed the door behind them. Hagrid looked down at his umbrella and stroked his beard. "Shouldn'ta lost me temper," he said ruefully, "but it didn't work anyway. Meant ter turn him into a pig, but I suppose he was so much like a pig anyway there wasn't much left ter do."
In other words, attack the fat boy even though he did nothing to warrant it. Gee, that's nice, and, coming from a fat man, bordering on the hypocritical. All I can assume is that Hagrid's somehow got word of the number of times Dudley has bullied Harry in his life (the phrases "He'd spent his life being clouted by Dudley", "chased by Dudley's gang" and "Dudley had always been able to kick him around like a football" occur just a couple of paragraphs before the pig's-tail attack) and decided payback was due. Besides, nothing like attacking A's worst enemy to make A believe you are A's friend! :-)