Actually there are only 8 left in storage now, all the rest are gone either via conversion to NPCU, lease, sold, or scrapped.If anything, Amtrak should've kept more F40's going when they thought the ExpressTrak initiative would require additional motive power. (And speaking of F40's, they've still got a bunch of those in storage as well!)
As for why they weren't kept for ExpressTrak, they have 1,250 less horse power than a P42 and weight less than a P42, both things you want when hauling freight. Additionally at the time the second order for P42's was placed, the oldest F40 was already beyond what is considered the normal useful life of a locomotive and the youngest was still already 12 years old. Then there are the cost savings realized by having one standard type of engine, in that you don't have to stock different parts and provide training on both types of engines.