Another thread made by someone who doesn't understand the plot...
Of course they're gonna get in trouble with a shark. They had just gotten separated from Luffy, Chopper and Jinbe and things were pretty hectic. Who knows how powerful these robots really are? They were made by Vegapunk, the world's (probably) smartest man.
They survived though, right? Their encounter with the shark served as the introduction to the next chapter and the arc itself. Oda knows what he's doing.