The owner (of the programs) and the licensee decide. For example, most–but not all–TV programmers don’t want to purchase a package with too many episodes. A general rule of thumb is that they usually license not more than about 130 eps. This way thay can show the entire package twice in one year. If there are too many more than that, usually some get sacrificed. And there are other reasons why some eps are withheld. Some examples:
“My Three Sons” The B/W eps with “Bub” and the later ones with Steve Douglass’s love interest are rarely shown–usually it’s the “color” eps with Uncle Charlie. This program was on for about 11 years, I think, so a lot gets cut out. B/W does not “go over well” anymore, so those are frequently chucked.
“Mannix” was on for 8 seasons–about 200 eps. The first season is never shown because that was almost a different program. Only seasons 2-6, and a few from season 7 are included in their package. Season 1 did not include Peggy (what’s Mannix without Peggy!), and the older ones just aren’t needed. Also in season 1, Mannix was not a PI, but some kind of “computer-using” investigator. It was a novel and cutting-edge idea at the time.
“Gunsmoke” lasted for over 600 eps. Ain’t nobody gonna bite off on a package that big.
TVLand is notorious for licensing a very, very small package of programs. Some of their packages are only 40 eps of programs that lasted over 100.
Also, some individual eps are withheld for various reasons:
The “Christmas Episode” of “I Love Lucy” has never been part of the syndication package, although it has been shown several times as a special.
“Twilight Zone” has two eps that have never been part of the syndication package, although they are available on video.
TVLand refuses to show one ep of “The Munsters” because of its content, although they have the entire package.
So, it’s possible that in an example of “The Simpsons”–and any other program that has been aired for, oh, say, more than six seasons–that any syndication package will not be complete. Just the nature of the business.