It turns out that these capsules are part of fishing gear! They are designed to be placed in fish traps.
At first, it seemed quite unusual to me, but then I understood how it works.
The baits are very simple: inside the capsules are small elements that rattle slightly when moved. This sound attracts the fish, which swim directly into the trap.

I was surprised at how well thought out this system is. I even found a video showing how fish react to this sound.

Many anglers use these baits because they are effective even in murky water when the fish’s visibility is limited.
Of course, this won’t be useful to me, as I’m not a fisherman. But now, if I see these capsules again, I’ll know exactly what they are!
Have you ever received an unexpected package that turned out to be something completely different?