The strength of cheap bathroom shelves is determined by thickness. Glass shelves of standard thickness could be stronger as compared to those made of a thin tempered glass. Keep in mind that glass shelves have a rating that indicates the amount of weight that can be allowed on them. Before buying, you should carefully ask about the rating.
Wood shelves are not made out of actual wood. Most of these are typically made of a solid core of engineered variety of wood or plywood or pressed wood that is cheaper in form. These are usually covered with a veneer, finish or paint. The shelves are a lot cheaper as compared to actual wood, and are often stronger and lighter than real wood.