DL rules say you earn according to the purchased fare class, If you buy an upgrade from DL with money, you get the additional MQMs if it's done before the day of departure and the ticket is reissued into a higher fare class. With the AF flight, I'm guessing that DL is treating this like a cheap upgrade purchased at the gate.