What is the function of Westminster Abbey?

It is primarily a house of worship, like any church or cathedral. It is also the location for coronations, weddings of the prominent, funerals of the prominent.