The Knight Rider example is very appropriate to demonstrate the reason for using "affirmative". "Affirmative" has only one well defined meaning; agreement with an assertion or request.
Its common synonyms "yes" and "right" have multiple meanings and connotations that must be implied by context.
In a tactical situation, it is important to express yourself clearly without ambiguity so that you may be quickly and accurately understood.
The ability to extract meaning from context requires a human, or highly advanced computer hardware and software. That is why using uncommon, but very unambiguous language is termed "robotic". Because robots do not have a choice. They lack the ability to imply anything, unless it is a specific preprogrammed response(which would be very rare).
Since KITT must often say "Left Michael", or "Right Michael" it avoids confusion for the driver if KITT never says "Right" except with the directional meaning.
Because of the reasons listed above, "affirmative" has acquired tone beyond "yes" when used in casual conversation instead of tactical operations. It implies a higher degree of confidence in your answer than simply saying yes. And, subsequently is often an attempt to bring the other party over to your way of thinking, as used in the second example.
Woman: Do I look OK?
Man: Yes, you look fine.
Woman: Do I look OK?
Man: Affirmative, you will be the prettiest at the ball.