Just my experiences here: Don't think it's a secret variable, it's just how aging decline is handled in the game.
I've had good seasons from 38 year olds. Almost none from 39 year olds. And if a pitcher still has useful looking ratings at 40, he had to have been a beast back in the day.
Aging starts in the late 30s but sometimes earlier, 34 or 35. Durability/Stamina go first. Individual pitches next. Control next, Splits last.
The biggest problem is that by age 38 the pitcher is having continuous in-season ratings drops. A pitcher who starts the season say at 80 overall will be a 72 or 74 by the end. By age 40 you're lucky if you can 50 pitches out of him.
Demand for such a pitcher is dependent on pitching scarcity in the league. I gave big money to a 37 year old once for four seasons just because I missed out on the bigger FAs and I needed a third starter for the playoffs. He got one playoff start, lost, and by age 39 he was mopping up in AAA. Bought him out at age 40.
If you're considering acquiring a player like this, just be thinking about how and when you can get out of his contract.