The way I figure it, a car basically has 4 components to its HP. You add them together, and you have your final HP figure
1. Base HP. This is a constant that never changes. All cars purchasable in the NCD are at base. Ripped tickets are at base.
2. Break-in HP. This ranges from 0 (fresh car) to a certain number (fully broken-in). NCD-purchased cars are at 0. OCD-purchased cars are at max. For the UCD, I haven't done any strict tests, but for most of them this is at max (at least for cars with reasonable mileage). I haven't checked the 0km Veyrons for their HP figures.
3. Oil HP. This ranges from negative (dirty oil) to positive (fresh oilchange). Cars from the OCD and NCD have this at zero, they are at their manufacturer-prescribed oil. Cars from the UCD usually have dirty oil.
4. Permanent HP loss. This is usually 0 below the mileage threshold, then turns into the negatives as you exceed the threshold.
2) and 3) are the reasons why certain 0 mileage cars have different HP values. OCD cars have max break-in HP, while NCD/ticket cars have 0 break-in HP. Then you factor in oil changes. Ticket car + oil change will have a different HP than OCD car alone, or OCD car + oil change