Why are bay leaves and oregano leaves used when cooking meat?

They are used to bring out the flavour in the meat and add flavour.

Dried bay leaves have a herbal fragrance which is similar to oregano and thyme. These herbs have an affinity to meats (particularly in stews) where they add a fragrant and spicy flavour.

Diiffrent herbs and spices have an affinity with different types of meats. Here is a listing of some popular combinations

Beef: Allspice, Bay Leaf, Mustard, Thyme

Duck: Cinnamon, Star Anise, Nutmeg, Sage

Game: Bay leaf, Juniper-berries

Lamb: Ciinnamon, Mint, rosemary

Pork: Bay Leaf, Ciinnamon, Cloves, Caraway, Fennel, Juniper-berries, Mace, Sage

Poultry: Marjoram, Nutmeg, Tarragon

There is a myth that people in medieval times used herbs and spices with meats to mask the flavour and odour of meat that was not too fresh. This is unlikely as spices in particularly were expensive and only affordable by the rich who could afford fresh meat and were therefore unlikely to be eaten meat that was going bad. Meat in medieval times was usually consumed fresh or preserved by salting, smoking or drying. The myth that medieval cooking used spices and herbs for this reason began to appear from the 17th century, when a new cuisine was being invented, in the royal courts of France, in opposition to the more spiced medieval cooking. This new cuisine relied more on the use of dairy products and using butter instead of lards or olive oil.