Although not in the form of disposable bottles, people throughout history have bought water, either for religious reasons or because they lived in areas where it was costly to transport water from the closest source. Many cultures and religions have used blessed water since prehistoric times, and people have been willing to pay for it since then, especially since the use of it in Christianity.
The first recorded reference to a vending machine is found in the work of Hero of Alexandria, a first-century engineer and mathematician. His machine accepted a coin and then dispensed a fixed amount of holy water. When the coin was deposited, it fell upon a pan attached to a lever. The lever opened up a valve which let some water flow out. The pan continued to tilt with the weight of the coin until it fell off, at which point a counter-weight would snap the lever back up and turn off the valve.