Afaik this used to be illegal. They used to refuse to fill Gasoline even in gas canisters if your car ran out of gas somewhere nearby. But then again my experience is not from self serve States.
Due to a recent pipeline hack a small part of the US is suffering a gas shortage. People will take desperate measures just to stock up on a little gas but they just don't use their brains when doing so. ...