A grocer near me (California) still operates this way for certain items. My wife and I go there for cream and milk from a nearby dairy and there's a $1 (I don't remember the exact value, it may be $2 or even $3) deposit on the bottle. Bring the (clean) bottle back and you can swap it for a new bottle or get your deposit back.