Depends on the animal. I like tubs because it is easier to clean, takes up less space, easy to move when needed, humidity is not a big challenge to keep up and affordable. I have my king in a 60 qt sterilite clearview tub, which is about 34 inch wide. Compare that to a 40 gallon breeder tank which I use for my bearded dragon, it is only 2 inch shorter, for 1/7 of the price and much easier to clean. Fyi, the general recommendation for adult kings are 20 gallon tanks or 30 something qt tubs. She was in a smaller tub but it was not enough space for her to stretch out.
With that said, I plan to move my king to a 70 gallon reptohabitat tank one day, when I can find that near me. I also use a Critter Cage glass tank for my CP. The little bigger escaped his tub twice, even with the binder clips keeping the lid tightly closed. I like the look of a glass tank and no worries about securing the lid if the terrarium comes with locks. Other reasons why I would go glass tanks if humidity is not a requirement and/or the animal is active and curious about the inside and outside of the tank. I use a large glass tank for my Merauke BTS who needs at least 50-60% humidity. However, BTS are smart, curious adventurers who likes to watch the world around him go by, so sticking him in any tubs is out of the question. I increase his humidity using coco fiber and a humidifier.