Basically, the way that the bee found this open can of soda was by luck and by effort.
In a hive of honeybees, various bees typically have different roles to play. One role that a bee can play is that of the scout. The role of scout bees is to go out of the hive and fly around looking for food. These bees are just going out "blind" and looking. They have not been told where the food is.
These bees go around and, if they are lucky, find food sources (like the open can of soda). At that point, they head back to their hive and tell the rest of the bees about the food source.