Both whales and frogs (plus the vast majority of two-eyed animals you can think of) are descended from a common ancestor that had two eyes. The origin of the two-eyed body plan dates all the way back to the first primitive fishes that lived half a billion years ago, which had flat vertical bodies with one eye on each side to get a 360º view of their surroundings. The two-eyed setup has stuck around because 1) two eyes on opposite sides of the head is plenty for animals to see the entirety of their surroundings, and 2) evolution tends not to make radical leaps like a brand new set of eyes, but instead makes a long series of small tweaks to existing structures, like adjusting the size and placement of the two eyes.
Latest Answers