There's probably more food traveling on land than in these small puddles of mud. That's probably why this fish has specialized to go out of water to search for food.
This is such a big step for fishes to do this.
It's hard to speculate about the behavior of fossils, but these animals had strong fins and a mobile neck, and I think there's a very good chance that these were also good terrestrial feeders.
They hold their prey firmly in their jaws and go back into the water where they can further digest it.
The first time we saw it, we were amazed - it was really spectacular.