The first ones that found their way to Europe were the ones with the white fruits. Later, the larger purple ones became more popular, but the name stuck.
The name eggplant seems to date back to the British occupation of India, but as the plant moved to Europe it became better known as Aubergine. The plant is indigenous to a large part of northeast India, through Burma, Northern Thailand, Laos, Vietnam and the south-west part of China and wild plants can still be found growing in these areas.
The word eggplant was first recorded in 1763 or 1767. Eggplants come in several different varieties and colors, and the name was originally applied to white varieties, which were small, round, yellow or white, and resembled goose or hen’s eggs.
Source: www.quora.com