Could you please tell me why from an historical point of view that when the letter *c* comes directly before the letters *e*, *i* or *y* in English that we use the /s/ sound, but in other cases we use the /k/ sound?

For example, *c* represent /s/ in *city, center, century, cycling*, but it represents /k/ in *car, camomile, counter, cabbage*.