There are laws, but in many countries they are not strictly enforced. In Japan, buying beer in the self checkout lane will just give you an “are you over 20?” prompt, no verification: https://news.ycombinator.com/item?id=46227987