Six hundred, even four hundred years ago, the bird we know as the peacock was just called a po, though by the latter time pokok and pocock had begun to come into favor.
The female was the pohenne or pohen.
But the o, sounded as in “cost,” gave rise also to the spelling paa.
Carelessness turned this into the sound pay, which, by the pronunciation of the English alphabet of that period, caused it in turn to be spelled pe and thence to pea, for “ea” then represented the sound we still have in “break,” “great,” “steak.”
Change to the present pronunciation began in the eighteenth century.