"Bonanza" actually got poor ratings on the air early on. It was aired at the same time as "Perry Mason," which was a top-rated show.
NBC kept it on the air as part of a cross-promotion strategy. RCA was the parent company of NBC at the time and was the show's biggest sponsor, and the fabulous outdoor scenes in "Bonanza" were seen as a way to help sell RCA's line of color televisions.
Rural Purge and the shows they put on to replace those shows really were a big part of our move left as a nation.