The holes in Swiss-style cheese are not tunnels left by mice and they are not drilled in at the factory.
They form during fermentation.
Certain bacteria used while making cheeses such as Emmental produce carbon dioxide gas as the cheese develops.
That gas becomes trapped in pockets.
The pockets become the holes.
Cheese is a controlled fermentation project
Cheesemaking begins with milk, but microbes and enzymes transform that milk into something very different.
Different styles use different bacterial cultures, temperatures, moisture levels, aging times, and handling methods.
Those choices affect flavor, texture, aroma, and appearance.
In Swiss-style cheeses, some of the bacteria continue producing gas during aging.
Where does the carbon dioxide come from?
Bacteria consume compounds available in the cheese and release metabolic byproducts.
One of those byproducts can be carbon dioxide.
The gas cannot always escape easily from the developing cheese.
Instead, it gathers in small spaces.
As more gas accumulates, the spaces grow.
Cheesemakers call these holes “eyes.”
Why are the holes round?
Gas presses outward in many directions.
In a soft, flexible cheese, that pressure tends to create rounded pockets.
As the cheese firms during aging, the shape becomes locked in place.
The result is the familiar smooth round holes.
Why are some holes large and others tiny?
The size and number of eyes depend on the bacteria, temperature, acidity, moisture, aging conditions, and other details of production.
Modern manufacturing can also produce Swiss-style cheeses with smaller holes than the giant cartoon version people often imagine.
There is no universal rule saying every slice must look like it lost a fight with a hole punch.
Do all cheeses make holes?
No.
Many cheeses use microbes and aging methods that produce little gas, allow gas to escape, or create completely different textures.
Some cheeses contain small irregular openings for reasons unrelated to the classic Swiss-cheese process.
The famous large eyes are a feature of certain styles, not a basic property of cheese.
Does more gas mean stronger flavor?
Not in a simple one-to-one way.
The same microbes and aging conditions that create gas also contribute to flavor development, but hole size alone is not a reliable flavor meter.
So mice did not tunnel through your sandwich.
Bacteria made gas.
The cheese trapped it.
Somehow the holes became the part everybody remembers.
A related bit of kitchen science appears in Why does bread rise?, where a different familiar food has its own chemistry.
And that’s the short explanation.
Related explanations: Why does bread rise?, Why does soda fizz?, and Why does popcorn pop?