Prior to Omicron, the vaccine was thought to effectively reduce risk of and severity of infection. If you’re not infected, you can’t spread it; if the severity is reduced, then presumably the viral load and risk of spreading were also reduced. Realistically, the “no-mask if you’re vaxed” policies were probably just to incentivize getting the jab.