It’s pretty simple. If you buy your groceries closer to closing time, you will most likely get a discount on your food. Because we’re travelers on a budget, we don’t mind getting ready to eat meals. Shit, we’re in Japan. The food is good no matter how it’s served, suckas.
Why is the food so cheap in the evening? Because the Japanese pride themselves on fresh food. Towards closing, they would rather get rid of the food by selling it at a lower price than just throwing it out, wasting it. They also do not want to sell it the next day because obviously it would not be fresh, maybe even spoiled.