I am wondering why there are expiry dates on cheese. Sorry if I am not very clear about how cheese is made, but isn't cheese made from rotten milk? Some cheeses have molds on them too.
Cheese is not made from "rotten" milk, let me clarify that. Rotting is an uncontrolled process in which bacteria, molds and other life forms colonize milk, eat it, release waste into it and die. The resulting, rather unpredictable, crud we call rotten (or more precisely spoiled) milk.
Most cheese is the product of highly controlled action by bacteria that produce acids that coagulate the casein in the milk. The type of bacteria, the temperature, the amount of time they are allowed to act, the amount of water you drain out of the curdling milk, all control the end result in terms of texture, taste and flavor.
The kicker, though, is that cheese is by no means a sterile product - not even cheese made with pasteurized milk. Bacteria remain inside the cheese, and of course bacteria (and molds and yeasts) land on its surface through its processing and shelf time. While the action of these bacteria can be slowed down by cold and dryness, most cheeses will go bad after a while. How long is "a while"? It depends. At room temperature, mozzarella will go bad in a matter of hours while an aged unopened Parmesan may sit happily on a shelf for months and even years.
(apologies for the short and brutal definition of cheese: I have omitted curdling by other methods and the various surface treatments that can be applied to cheese crust)
Most if not all supermarket products have expiry dates for many reasons, stock rotation, product recalls, insurance, etc
For many products you can generally ignore it, and use normal food safety advice on how long something will last
People have always done this with wine, why not other foods?
Interestingly it has become a sort of modern hobby. Buying fresh bulk cheese and ageing it yourself to see how "tasty" you can get it
As Walter points out, cheese is not made from rotten milk. It is made from clean milk that is deliberately infected with specific cultures that cause the milk to coagulate
Building on some of the answers above:
Expiry dates on cheese serve a couple of purposes: one, to let markets know when to throw it out/return it to the vendor, and two, so that you know if you're buying a cheese today whether you can expect to use it next week.
For judging the fitness of the cheese itself in the fridge, it's generally pretty obvious when a cheese is bad. It's sprouting lots of fuzzy mold, exuding smelly liquid, and/or just reeks in a way it didn't when it was new-bought. I tend to find that most cheeses are actually good significantly longer than their expiry dates would indicate if stored properly.
Moisture, moisture, moisture! That is the difference between aging cheese and cheese going bad. Aged cheese is allowed to "dry up" relative to the amount of time it is aged whereas cheese that goes bad is due to aging while maintaining its moisture content.