For anyone unfamiliar, barrel obstructions can be very dangerous as they can result in unsafe pressures when firing.
Here a soldier has put condoms on the ends of these machine gun barrels to prevent sand and dust from entering. Presumably before riding in a convoy along a dirt road.
Iirc I’ve also seen them as a cheap modification to turn a mic into an underwater mic.