Yeah people did this in drive thrus and thought they were being cute. It’s real cute until the next person ordered 6x as much as you did.
A nice thing to do is to see a mother struggling to pay for her groceries and offering to step in and to put them on yours. Paying it forwards sets off a weird chain of guilt that is not as nice.