Eyes are far superior to eyespots in certain ways (accuracy, for one), but far inferior in others (energy consumption, size, durability). They are newer than the eyespots of the last common ancestor, but they could well be older than the eyespots of some flatworm species alive today.