Due to it inexplicably sleeping for 10 seconds in between each tag updated.
I mentioned the reason above, if you run this in production (not WMF), it would cause the whole database go read-only because of number of the writes will be super big. One thing is to reduce it to 2 seconds, it'll help but not much.
Sorry, I misinterpreted your earlier comment.
If you run this in WMF production, you can pass the --sleep option. Whereas with update.php you're a smaller site and probably want it done as quickly as possible to minimize the site downtime involved with running update.php.
Although, why does the waitForReplication() call not avoid overloading the database without the arbitrary sleep?