The name "cottage pie" was first used at the end of the 18th century. It was around that time that the poorer people of Great Britain, people who lived in cottages in the country, started using potatoes as an everyday food. Originally, a pie made with any kind of meat and mashed potato was called a "cottage pie". In modern British English, the dish is usually called "cottage pie" if it is made with beef. If it is made with lamb it is usually called shepherd's pie.
John Ayto (1990) The Glutton's Glossary: A Dictionary of Food and Drink Terms, Routledge, London.