The device is a universal drain stopper. It is designed to keep water in a bathtub or sink. Because it works by sitting on top of the drain, it is not necessary for the consumer to worry about the diameter of the drain opening, as is the case with traditional drain plugs that sit inside the opening.
These work by creating a seal against the smooth surface of the tub or sink around the perimeter of the drain, being held there by the weight of the water. They are not effective at keeping gases from escaping, therefore, unless the basin is full of water. Furthermore, they are not particularly effective with drains such as the one in the photograph, because of of the joints between the tiles. The material is not flexible enough to seal these joints.
The purpose for which this thing has been placed on this drain, therefore, is unlikely to be related to sewer gases, because it will not be very effective for that purpose. It might be marginally more effective at keeping water out of the drain, but probably only for a couple of minutes, so that is also unlikely to be the reason.
The speculation that it is to keep scorpions or vermin of a similar size from escaping the drain seems more likely. This would be effective against creatures that are able to swim through the water in the trap, small enough to pass through the metal drain cover, too large to crawl through the tile joints, and not strong enough to move the cover. If there are any local scorpions or other vermin that have these characteristics (cockroaches?), that's probably your answer.
Have you tried asking the owner of the apartment or other people who live in the area?