The Seinfeld story is really crazy in hindsight. There was no reason for NBC to want to keep it, but somebody really wanted it to succeed. That almost never happens, especially back then. Seinfeld went from being just another forgotten sitcom that would have been the subject of a YouTube video to one of the most beloved sitcoms of all-time.
These networks know what they're doing. If they want a show to make it, they'll do whatever they can. When Friends was months away from airing, Jennifer Aniston wasn't cast as Rachel because she was in another sitcom. Had that show lasted, somebody else would have gotten the part. The CBS and NBC executives struck a deal to air a movie of the week at the same time Jennifer's sitcom was airing, knowing those movies were popular and would steal ratings. They literally sabotaged an entire sitcom just so Jennifer could play Rachel, because they knew Friends had potential to be a big hit.