It turns out that the guy who had been contracted for the accounting software integration had modified the active theme to include an obscure and weird PHP class that syncs the available products/SKUs with the accounting software.
This was a heavy task and took about a minute to run manually and was triggered by a request to index.php, using a specific GET parameter.