Years ago at a party someone asked me what I did for work, and I said structural package design. They said "huh?" and I explained that I designed bottles. The person pointed to the bottom of the booze bottle they were holding and drinking straight from (it was that kind of party) and said "I know why you guys do this."
That was the dumbest thing I'd ever heard. The volume of the bottle is printed right on the label, for chrissakes. If you told me the cavity was there to trap spiders, I'd have considered that a more intelligent guess.
The indentations on the bottom of bottles (called punts for glass bottles; in my work with plastic we called them dimples or push-ups, which I think was colloquial) are there for the same reasons, whether glass or plastic: It adds strength to the base and, more importantly, allows the bottle to stand up.
If you were to mold the plastic, or blow the glass, perfectly flat at the bottom, this heavier material at the bottom of the mold would have a tendency to bulge (the wrong way) as it cooled, leading to a wobbly bottle. This is true of all drinking glasses as well—no one is putting an arch in the base of a martini glass to give you an inflated sense of its volume.