If you're going to be there thinking about how you want to drink all night and how it's so unfair that you cant and envy the people who are etc you will
A. Drink
B. Be miserable all night because you didn't drink.
Over time you'll be able to go to restaurants that have a bar and not be bothered. Big Book even says people can have liquor in their house and not be tempted once the obsesion is removed. But in early sobreity its better to be safe than sorry.
There are still days in my sobriety where I know I can't be in certain places bc I am feeling some type of way. Or I am in an situation where I am at risk so I get out. I missed 2 family weddings in sobriety bc they have open bars and I knew if I went I'd just be pissed off the whole time because I couldn't drink. I'm sure there are plenty of people who are perfectly fine at functions like this with alcohol I personally just did not feel ready for this yet