You need 100 episodes for syndication. They only had 37 - 1 1/2 years.
Studios profited off their shows in off-network syndication. 100 episodes gives you a show a day for 20 weeks. 130 episodes meant you could run the whole season twice in a year. 260 episodes (12 seasons in a modern 22 week schedule, 10+ seasons in a 25 episode season, while older eras of 39 episode seasons would be seven seasons) packs your lot for a whole year of five a week.
For reference, the longest “strip” in syndication currently is Jeopardy!, which has a 46 week season of 230 episodes.
Star Trek had (according to wikihahahahahapedia) 80 episodes. IMO, its greatest success was in syndication. IIRC, Gene Roddenberry was absolutely desperate to get that third season (even if it kinda sucked) in order to make syndication. He got it, and made history.