Why does my delete_post hook get called twice

I found my solution.

The function you hook into delete_post (or probably any other similar hook) executes as many times as needed. Considering delete_post needs to delete the post and all of its revisions, it will always run more than once. In order to avoid having your function execute each time WordPress deletes a record from the database you can use did_action( $hook ). This function returns the number of times the hook executed. With this in consideration, we can fix our multiple-executions problem by placing this condition into our function:

if (did_action('delete_post') === 1)
{
    // execute code here
}