As I recall, there is a video of Rod Roddenberry out there (possible on the Roddenberry Vault Blu-Ray) talking about how Norway Productions and Gene Roddenberry were able to keep the ancillary rights to Star Trek back in the 60's when Roddenberry sold the show to Desilu, which the Roddenberry estate still controls, and allows for them to run their web store with official Star Trek memorabilia that is created exclusively through them. It possible that they were done in a similar fashion to how Fox and William Dozier's Greenway Productions both held the rights to the 1966 Batman series. (https://www.wired.com/2014/11/batman-home-video-finally/)Roddenberry (through Norway, basically a shell corporation), Shatner, NBC, and Desilu each had a share of profit participation in the show. Through Hollywood accounting, the show didn't go into profit until the 1980s (and probably only went into profit then because Roddenberry and Shatner sued Paramount for their share).
Desilu (later Paramount, later CBS) always controlled the underlying intellectual property.