The items due under the 40k service should have been addressed as part of the CPO prep/process but if the car was under the 4 year mark it’s entirely possible the dealer skipped it only completing the inspection, oil change, and tires. The car is due for the service regardless because of the age, it’s just a matter of if you’re paying for the full thing vs what has been done already. I’d certainly ask the dealer to list the line items of the 40k service and check each one against the vehicle history to see what is truly due and has to be paid for. I learned this expensive lesson buying a CPO Macan where the transmission flush was not completed even though the car was at 4 years of age.