Not sure I’d want to eat a lot of mouldy cheese myself…
One answer is that, if it was a piece of cheddar, say, and you cut away the mouldy bit, the bit that was left that you ate might not have had much mould in it.
Another thing is that your body has defences against things that you swallow that aren’t good for you, like the acidity in the stomach that kills off microorganisms.
Yet another reason is that some moulds are probably more poisonous than others. So eating a small bit of a not-terribly-poisonous mould might not do you too much harm, but eating a LOT of it might make you ill…. And if it is a very poisonous one, then even a little might be bad for you. Of course, there are some ‘special’ non-poisonous moulds that are part of the cheese-making process, like the ones used to produce blue cheese
Another really good reason NOT to eat mouldy cheese is that, if the cheese is old enough to have gone mouldy, it might also have had time for nasty bacteria to grow in it – especially true of soft cheeses, and I’d be very wary about anything mouldy that had been made from unpasteurised milk.
In general, it is more of a worry if a ‘soft’ cheese has gone mouldy than a hard cheese; with a soft cheese, if you can see mould on it, then probably all the cheese is mouldy. With a hard cheese (like cheddar or leicester) it’s possible that only the surface is mouldy, while the cheese away from the mouldy bit may be OK. There’s a useful page explaining all this a bit more over here.
Moulds are actually vitally important for the development of some cheeses. For example, the rind on brie and the blue threads that run through stilton. They add to the flavour of the cheese and influence it’s character. It used to be that the process was allowed to happen naturally by exposure to the environment, but cheese making is more controlled now and the mould strains that are introduced are usually well characterised and identified so that the cheesemaker knows what they are using and that they can make reproducible cheeses. Some people have problems with stilton and other blue cheeses, as a common mould used to make it is Penicillium roqueforti. As the name suggests, it does actually make the antibiotic penicillin! My mum loves stilton, but is mildly allergic to penicillin, so her mouth goes numb when she eats it!