Example: A letter writing campaign by fans saved Star Trek. There's actually no proof of that. Fans infer it, but that's not the same thing. There's no evidence that NBC actually planned to cancel it at the end of the second season, and its "death slot" timeslot might actually be because NBC got a tobacco company to sponsor the show, and tobacco product ads could not be run before 10pm. See? It's not always so simple as B because A.
What I gather is that the reason TOS was bumped to a less ideal time slot was because the producer of Laugh-In insisted on getting the slot that NBC had promised to Roddenberry, and since Laugh-In had bigger ratings, it won the slot.
Also, the thing that got the show renewed was the same thing that gets most struggling shows renewed: an agreement to reduce the budget for the new season by reducing the episode count, having fewer guests and extras, doing less location shooting, etc. You can see the same thing happen with the later seasons of a lot of shows -- for instance, the past two seasons of Agents of SHIELD have been heavily dependent on standing sets and bottle stories.