I recall a newspaper article contemporary with the cancellation. It said NBC simply found that kids were willing to watch the same few ST cartoon eps over and over (and I sure was at age 11-12), so there was no need to spend money on new ones.
It's ironic (if
it's true) that audience loyalty would kill the show, but in those days the market was different. Later animated shows like The Simpsons
and Family Guy
were kept alive by loyal audiences because new episodes keep interest up, and thus the merchandising gravy train keeps flowing. They have T-shirts, DVDs, endless stuff for sale. ST TAS had almost no such secondary markets to incentivize the studio.