Liquid water conducts heat from the outside of the bottle to the ice inside better than air can.
In the bottle you drank out of, you have a block of ice surrounded by air, in the unopened bottle, you have a block of ice surrounded by water.
If you had a third bottle, with ice in it, and the air was drawn out with a vacuum pump and the bottle was capped off, you'd see the ice in the evacuated bottle would stay frozen longer than the bottle with air in it.
This is how a thermos works. The walls of a good thermos have the air pumped out to reduce the transfer of heat through the walls. Cold things in a thermos stay cold, and hot things stay hot, because energy can't move as easily through the vacuum in the walls of a thermos.
You can visualize this at the atomic level by thinking about the density of a liquid as compared to the density of air.
Heat is energy stored in vibrating molecules. Solids are denser than liquids, and liquids are denser than air. That means solids have more molecules packed into a volume of space than liquids, and liquids have more molecules in a given volume of space than gases.
When molecules collide, they transfer energy, if the material is dense, you have more molecules moving around near each other in a given region of space, so there are more collisions between molecules occuring in a given span of time, and energy dissapates throughout the group of molecules that make up the material faster than if the material were not dense.
The liquid water is denser than the air, has more molecules per unit volume, and thus will have more molecular collisions, and energy transfer will go faster through the liquid.