They still read the banns at some churches in the UK! It depends on the denomination, I think (and I’ve no idea if there is an equivalent for non Christian religions). At the town hall, they have a display screen with the names of hundreds of local couples who have given their notice of marriage. Which made us a bit paranoid that someone we knew would see it, as we hadn’t told anyone in advance.
The purpose is the same in church and secular weddings — so that anyone can raise an objection if they know of a legal reason why the couple shouldn’t be married. It’s like a city-wide version of the moment in the ceremony when they ask if anyone has a reason why the marriage shouldn’t go ahead. Maybe bigamy used to be a really big problem here? I have no idea!
The actual process of giving notice was kind of intimidating. We each had to go into a room separately, show our passports, and answer questions about ourselves and each other (address, date of birth, confirm that neither of us had been married before and we weren’t related, etc). I’m curious about how this works in other countries now. Do other people get to skip the interrogation?