The monkeys are on display beside the crocodile and, since the crocodile is motionless and appears to be dead, they are far more interesting to Elena Ivanovna and her husband Ivan Matveitch than the ostensible star attraction. Elena goes to look at the monkeys, proclaiming,
I am awfully fond of monkeys; they are such darlings ... and the crocodile is horrid.
Her husband, meanwhile, tries to induce the crocodile to display some sign of life by touching its nose with his glove.
The principal role of the monkeys is to provide a distraction for Elena, who is captivated by them, and for the other characters, who follow her lead. While she is laughing and pointing out the resemblances between certain monkeys and various members of her social circle, she fails to notice what is happening to Ivan. It is only when they all hear a piercing scream that Elena and the others turn around to discover that the crocodile is eating Ivan.
One might argue that the monkeys fulfill the same role for the reader as they do for the characters in the story: that of distraction and misdirection. They provide an early naturalistic element which suggests to the reader that the story will be broadly realist in tone and content, so that we are surprised by the surreal elements which follow.