I saw a video in YouTube that a Dusclops appears out of nowhere.
If you have an answer, type one below.
This is the video
A Pokémon with a high level of sociability can attract a wild Pokémon from the area in which the player is camping after cooking and eating curry, this Pokémon is pulled from the grass encounter table of the location, regardless of the location (such as a cave). The Pokémon will be captured in a Poké Ball from the player's inventory, if there isn't one present the game will move onto a Great Ball and then an Ultra Ball, should the player not have any of these balls in their inventory, the game will generate a regular Pokéball for the capture.
In short, yes, it's random.
Source and experience
Hope I helped!