Imagine a waterfowl family tree, with each species being a person. The 1st cousins of egyptian geese are the shelducks. Mallard ducks are more distant cousins, but closer than geese.
This happened all the time when it comes to animal names. People naming different kinds of animals did the best that they could. They didn't have access to genetic data like we do now. For example, just look at the mountain lion. It is not a lion. Real lions are more related to tigers than they are to mountain lions.
For a more extreme example, compare the red panda (a small reddish creature, somewhat related to raccoons) with the giant panda (a black and white bear). When scientists discovered the giant panda, they assumed that it was closely related to the red panda, hence its name. Even 15 years ago people thought that red pandas were bears.