/kojo/ → */koj/ → /koi/
One theory suggests a sound change from 来(こ)よ (koyo), dropping the last vowel, from original koyo to koy (= koi). Compare せい (sei), くれ (kure).
来(こ)い • (koi)