Plastic is cheaper and doesn’t shatter. Some states in the US still have the refund thing for bottles. I’ve seen a vending machine in NYC for bottle refunds and one in Munich, Germany.
When I was in Central America they wouldn’t let you leave the store with the bottle. They would provide a plastic bag where you could sip the coke out with a straw.