There may be food particles or something they think is food in the rocks. Betta's have an amazing nose for food. Zeus can be sleeping in his cave or under a plant leaf when I drop a pellet in. it takes a few seconds, but he snaps to life and makes a b line for where I dropped the pellet in. I choose a different place every time too and he always seems to know where to go almost immediately.
No searching and looking around. I have even tried touching the water in one place while dropping a pellet in another and it is always straight for the pellet.