If HBO was more successful there's certainly a shot it would have not been cancelled over this. But overall HBO relies on subscribers and critical acclaim over ratings, and Luck was already stirring controversy over the horse deaths. Treme has rather pedestrian ratings, but keeps getting renewed because critics love it.
It seems like they're still failing to find a true flagship show; True Blood, Game of Thrones, and Boardwalk Empire are obviously their most popular shows but I get the feeling they want something less niche, like another Sopranos. They thought BE would be that show, and while the ratings/critical acclaim are good....eh, it's just not a "must see" show.
I bet HBO execs kick themselves every morning for turning down Mad Men