@clacke A little of both.
As to The Original Series, there is quite a bit of history there. The whole concept of “residuals” didn’t exist yet when those episodes were produced. They could be easily farmed out via syndication then because no further payments to actors was required unlike the situation today. People forget that Star Trek originally ran on NBC for 3 seasons before it hit syndication. It arguably hit more of an audience outside the straitjacket of NBC.