Receive inherited the "ei" from French. Retrieve was "e" only, switched to "i" only, and then went to both, all after it was already in English.
A lot of the crazy spelling in English is either because of old French or because medieval/Renaissance scholars found out about Latin and decided they wanted some of it for themselves.