A couple points:
First, neither the NV/iD or ATi/Valve performance differences are intended to make the "other" graphics card perform poorly. Instead, you have each SW developer going down a different coding path and HW developer making a card with different strengths and weaknesses.
If you look @ farcry, where ATI has an advantage, you will see a couple things. First, it is using DX with extensive shader routines (at least compared to existing games). Second, we notice that all the new cards perform similarly until you activate AF, at which point NV performance takes a dive compared to ATI performance. Since it has been mentioned that NV sacrifices some shader paths in order to run AF while ATI has a separate path for AF, the fact that NV looses out when AF is activated should not be surprising. Therefore there is no evidence that Farcry has attempted to optimize performance on one card and hinder performance on another.
I bring up Farcry because it is probably the DX9 game that is most comparable to HL2, and therefore will probably best represent how HL2 will perform on NV relative to ATI when it is released.
If you look @ iD, where NV has an advantage, you will see that they are using OpenGL without the shader routines. NV has historically had very strong OpenGL performance, and has also optimized their HW design based on that type of rendering. While iD will try and make their game run as well as possible on NV cards, they will also work with ATI towards the same goal. Now, I don't know enough about Doom3 to know how AF is implemented, and how that impacts NV's performance, however, if Doom3 does not make extensive use of the shader paths, then it is very possible that NV will not have as great a performance hit as they do under DX and will therefor perform better.
There is no evidence of any software company deliberatly optimizing their code for one graphics card while sacrificing performance on another. Instead, you have one set of HW that has an advantage in shader intensive games with AF enabled, and another set of HW that is better @ rendering Doom3. In both cases the software companies and the HW companies work together to get the best performance from any hardware combination.
Finally, all the high end cards play the newest games at very playable framerates, so the only reason to worry about which one ends up on top in which game is so you can brag about your HW.
-D'oh!