I think there's actually 2 problems with GT5's AI.
1) It uses the exact same algorithms as your b-spec driver, but it gets no input from a player. That means that the AI emotion-bar cools off when driving with no other cars around, and it actually ends up going up to 10 seconds slower on an average lap than it could do. Now, that is not even good behaviour in b-spec (the gap between fast and slow laps is just too big - show me one driver whose laptimes vary by that much), but when you are competing against the AI, this is unacceptable. And yet, it would be easy to fix. You would just have to force the AI to stay at a fixed emotion-state that represents something close to what produces their ideal laptime. That would already be a big step.
I can see why PD chose to use this emotion-behaviour. In an ideal form, it would help to keep a field together, because single cars out front would slow so that the others could catch up again, thus creating a self-regulating system. Only problem is, that the (current) car selection in the provided races is not good enough for this kind of thing.
2) The general behaviour of the AI has too many flaws. They have been discussed at length here already, so I don't want to repeat the whole list. Too early braking, braking mid-corner, letting you through when you're in a certain position to their car ... it all seems like it hasn't been properly tested, so the algorithmic flaws were never ironed out. I do admit though that this one is harder to fix than 1).