Okay, here's are two very simple explanations for why networks typically don't do that.
1) Advertising slots are sold in advance for a fixed rate on the assumption of a certain number of viewers*. The more viewers a show is expected to have (and this expectation is based on the upfront, the time slot, the network's history, and the show's track record), the more money the ad slots are sold for. Networks guarantee a minimum number of viewers. If those viewers are not there, networks either need to (partially) refund advertisers or pull the advertising altogether, use more slots for in-house ads, and offers the advertisers better slots elsewhere on the network. When a show craters, it costs the network money immediately. They don't get to hold out for a year and then renegotiate the ad rates and tell advertisers "LOL punk'd u picked a bad show doggy".
2) Secondly, while renewals are not based on retention, retention matters. Viewers who show up for one show often leave the TV on and watch the next show. It keeps viewers on network and it keeps them watching TV. This effect ripples through the night, so a consistently weak primetime lineup will end the night with very poor audiences. After primetime is over, local affiliates (the actual tv stations in each area who brand themselves as part of ABC, NBC, CBS, FOX, CW, etc) take over programming. Affiliates are not technically guaranteed any viewers per se, but they are happier when more viewers get passed to them which feeds into #1 above. Affiliates threaten revolt, threaten to not air certain primetime shows, or threaten disassociation if national networks are not fulfilling their obligations to the affiliates.