Why does this update_post_meta function not delete the custom field itself?

You’re looking for delete_post_meta($post_id, $meta_key, $meta_value);

Parameters

$post_id (integer) (required) The ID of the post from which you will delete a field. Default: None

$meta_key (string)
(required) The key of the field you will delete. Default: None

$meta_value (mixed) (optional)
The value of the field you will delete.
This is used to differentiate between several fields with the same
key. If left blank, all fields with the given key will be deleted.
Default: Empty