It was purportedly (and probably in actuality) intended as a survival aid to be used after landings and before recovery in the Siberian wilderness, although allegedly was intended as a defensive weapon against in-space attacks by the US space program.
The attack in space angle was probably just to convince some manager.
The survival in Siberia is completely valid. US retrieves their astronauts in the ocean, but Soviet Russia didn’t/doesn’t have such a worldwide navy, so Siberia it is. It could take days for the cosmonauts to be recovered, so it was expected they might need to defend themselves against wildlife or even hunt.
Because space is haunted. And buckshot’s superior spread helps ensure a hit while spinning around in zero-g. Solid slugs would go straight through the soyuz walls, duh.