There is a real irony in the credit. The teleplay is credited to Herbert Wright, who — per his Wikipedia biography ↗ — studied in Japan as an exchange student, met Akira Kurosawa, took up a lifelong study of martial arts and held a black belt in Japanese sword. A writer with genuine grounding in East Asian martial tradition wrote the Sun Tzu episode; the line most often credited to Sun Tzu because of it is the one he made up. (The connection between Wright’s background and this particular line is our own observation, not a claim made by that source.)
One honest caveat on authorship: television teleplays are collaborative, and first-season Star Trek: The Next Generation scripts were heavily rewritten in the producers’ room. The line is present in the 8/7/87 script under Wright’s teleplay credit, which is the strongest documentary claim available — but we cannot prove which hand typed that specific sentence, and we do not assert it.
Why does the fake outperform the real thing? Because it is shorter and more quotable. Sun Tzu’s actual maxims are conditional and procedural — if you know X then Y follows. “Fear is the true enemy, the only enemy” is an aphorism: absolute, symmetrical, and repeatable. It is written the way modern audiences expect ancient wisdom to sound, which is precisely why it does not sound like Sun Tzu once you have read him.