They are kind of two different purposes. The barrel ports help counter muzzle rise and thus reduce felt recoil. They do bleed off some of the pressure behind the wad and slow it a bit though. Ports in a choke are exclusively meant to slow the wad and give the shot a chance to separate from it. The sharp edges of the ports grab the wad, both stopping any spin and slowing it down as gas is vented behind the wad acting kind of like a jake break. This is all about improving patterns along with other features of the choke such as wad catchers, parallel sections and overall choke geometry.