the $1/gallon tanks are the exact same tanks that they have when there is no sale. So, if you're getting your tanks from Petco, you face the same quality control, on sale or off.
Since they are AGA/Aqueon tanks, the tanks you get at Petsmart, or many LFS's, are basically the same. The two PetPlaces can offer these prices because, as someone mentioned, they have enormous purchasing power because of the quantity of tanks they buy.
Note also that no well run company sells stuff for below cost; I'd imagine the sales prices are approximately Petco's cost (or maybe cost+like 5%, to get a decent ROI). What they're almost certainly doing at these times is to try to move inventory - partially the actual glass boxes, but more so the other stuff you have to get when you buy these boxes - lids, lights, livestock, filters, etc - because of either seasonal demand cycles or because of internal accounting reasons.
This is also a great deal for them because it gets people buying - I'm told an old adage in the aquarium business is to sell the tank for cheap, and once the customer is thereby committed for a decent period of time. They can then make the money baking in higher returns from the accessories (food, filters, maybe livestock, LED lamps, protein skimmers, tank controllers, media reactors......

)