To the contrary, we saw in "Tomorrow is Yesterday" that the computer is quite capable of the exact kind of cognitive sophistication required for sophomoric jokes - and our heroes didn't like that a bit.
You need to watch that episode again, or at least read the transcript
. All the computer did was speak in a seductive tone of voice and append "dear" at the end of its otherwise routine statements -- both of which could've easily been achieved merely by reprogramming its speech synthesizer. No cognitive sophistication was indicated at all. The joke was on the part of the Cygnet XIV computer technicians who programmed it to talk that way.
Perhaps you're confusing the episode with the old novel Web of the Romulans
by M. S. Murdock, which purported to be set immediately after "Tomorrow is Yesterday" (despite also being set months after "The Enterprise Incident" and having Chekov on the crew) and elevated the computer's "flirtatious" behavior, merely a minor distraction in the episode itself, into a full-on, stalkerish romantic obsession with Captain Kirk.