Think of the convenience store near you. In much of North America, Britain or Australia, that often means the shop at the petrol station: crisps, fizzy drinks, a fridge of sandwiches that went in sometime earlier in the week, maybe a hot dog turning slowly on a roller. You go there when you are out of milk, not when you are hungry and want something good.

Now picture a traveller on their first night in Japan. It is late, the restaurants near the station are closing, and they walk into a brightly lit shop on the corner. They come out with an egg sandwich on soft white bread, a couple of rice balls and a cold tea. They eat the sandwich on the hotel bed and stop halfway through to look at it. It is genuinely good.

Plenty of visitors tell this story, and many go back to the same shop every day of the trip. So what is different? The short answer: Japan’s big convenience store chains are built around fresh food, made in factories set up to supply them, delivered more than once a day, and adjusted constantly according to what people actually buy. Here is how that came about.

The shelf that watches what sells

Japan’s first Seven-Eleven opened in 1974, in Toyosu in Tokyo. Today there are well over 50,000 convenience stores in the country, most of them belonging to three big chains, Seven-Eleven, FamilyMart and Lawson, and they are everywhere: by stations, in office blocks, on quiet residential corners.

In 1982, Seven-Eleven Japan started using a point-of-sale system, the kind of till that records every item as it is scanned. That sounds ordinary now. What mattered was how the data was used. Each sale says what was bought, in which shop, and at what time. Put enough of those together and you know that this shop sells rice balls at 7 a.m. and salads at noon, while the one next to a university might sell out of instant noodles at midnight.

That is how a shop the size of a large living room can stock the right food. It does not try to carry everything. It carries what the people walking past its door tend to want, and the order changes as their habits change. A new product that does not sell is dropped quickly, and its place goes to the next one.

Food that arrives fresh, more than once a day

Data only helps if the food on the shelf is fresh. Rice balls and boxed meals do not keep for days, so the chains built supply lines around them.

Much of the food is made in factories built to supply the chains’ own products. Take one of these makers, a company called Warabeya Nichiyo, which started supplying Seven-Eleven in 1978. Across the whole group, its factories can turn out up to around three million meals a day. Getting all that to the shops is its own puzzle. As early as 1976, Seven-Eleven started combining deliveries: instead of each supplier sending its own van, goods from several suppliers arrive at a shop together.

In 1987, Seven-Eleven began delivering rice dishes three times a day. The next year it set up a system to keep rice dishes at about 20°C all the way from the factory, through the truck, to the display case.

Small details got the same attention. In 1978, Seven-Eleven started selling rice balls wrapped in a film that keeps the seaweed separate from the rice. You pull a tab, the film slides out, and the seaweed wraps around the rice still crisp. Getting the film out cleanly takes a try or two. Finding somewhere to throw the wrapper away afterwards can be harder.

Why food, of all things?

Lots of countries have chain stores with tills and trucks. Why did Japan’s put so much into food?

One common explanation is who shops there. In Japan, plenty of people pick up lunch at a convenience store on a normal working day: office workers, students, people who live alone and do not want to cook for one. In a business district at midday, there is often a queue at the till. A shop with regulars like that has every reason to make lunch worth coming back for.

The other part is competition. The big chains often have branches within sight of each other, and they fight over the same customers with their own versions of the same things. New items appear on the shelves all the time.

This has a cost, and in Japan it is openly discussed. Most stores are run by franchise owners, many of them open around the clock, and finding enough staff is a common struggle. In 2020 the Japan Fair Trade Commission published a survey of franchise owners about their dealings with the head offices, including questions about staying open 24 hours. In a shop that never closes, someone is restocking those shelves at 3 a.m.

Back to the egg sandwich

So the sandwich on the hotel bed was not luck. It came from a factory set up to supply the chain, on a delivery that runs to a timetable, to a shelf whose contents are decided by what people in that neighbourhood actually buy, in a market where a rival is a short walk away and sells its own egg sandwich.

If you visit Japan, try going into the same convenience store in the morning and again late at night. The shelves will not look quite the same, and that is the whole idea.