The glue needs to be exposed to air,
if it’s not exposed to air, the glue usually won’t dry. So, by keeping glue in a sealed up bottle, there isn’t enough air reaching the glue for the water to dry out and the glue to stick!
Inside the bottle there will be air also but glue is more and air will be less. so glue wont stick to the bottle. I hope you ever observed, if the glue is very less and the air is more in the bottle , we find the glue got dried up. anyway glue is used to stick paper or wooden things or anything and bottle is made of plastic , so it wont stick. These are the 2 reasons.
Sticking occurs according to forces called adhesive force and cohesive force.Two dissimilar materials will always have adhesive force and they will stick only when this force is greater.