Fn_Process_Paypal_Ipn -- Why Recalculate The Order

In the IPN response code, the order gets recalculated about halfway through:

fn_calculate_cart_content($cart, $customer_auth);
Is there any reason to do this? What would have changed between sending the order, accepting payment for the order at that value, then receiving a response from paypal.
In our experience, the orders are getting re-calculated incorrectly (we have some custom logic that works during order placement, but for whatever reason this re-calculation breaks the promotions)
So for example, the system at this point doesn't even "care" if the data is accurate, it doesn't throw any error. To me it looks like the orders stay more accurate if you just accept them as they were stored before the IPN response.
Perhaps I'm missing something, is there any specific reason to leave this recalculation in place.

I believe it's because the subtotal needs to match the sum of products (which isn't necessarily true since addon fees do not get put into the products array). The short answer is "because it's paypal so nothing is normal or simple".

Ideally in an order (or the $cart), there would be a separate 'fees' array where addons could add fee elements like:

$order_data['fee_subtotal'] = $8.00 ( sum from below)
$order_data['fees'] = array('gift_wrap' => 5.00, 'premium_gift_card' => 3.00)

And of course there should be a corresponding 'credits' area too so returns could be clearly shown as a credit to an order....

The cart would then use:

$order_data['total'] = $order_data['subtotal'] + $order_data['shipping'] + $order_data['fees_subtotal'] - $order_data['credits_subtotal'] - $order_data['subtotal_discounts'] - $order_data['cart_discounts'];

Each payment provider with "special needs" could be adjusted to use the appropriate subtotal data which are the logical areas of an order.

ok thanks for that. It looked like it wasn't just the recalculation at fault, our promotion was looking for data in the wrong place during re-calculation.