This gets explained beautifully in A.C. Moorhouse's "The Triumph Of Alphabet".
The Etruscans adopted Western Greek alphabet but then their scribes got lazy and started writing kappa without the vertical line, so it was like a modern day angular parenthesis.
The Falliscans, on the other hand, adopted (Western) Greek alphabet verbatim.
So when their cousins the Latins started to write, they expanded on both precedents. "Angular bracket" K got cursive-ized into "C" (was put in the place of gamma for in Etruscan "G" sound was an allophone of "K"). Greek "kappa" and "qoph" were imported as well - so they now had 3 letters to represent the "k" sound, when to use each?
The adopted solution was a convention: use "K" when the next sound is "a", "Q" before U/O, and "C" if next sound was E/I. Such usage was preserved in the names of those letters which survive to this day in most modern day Romance languages: ka, ce, qu.
Over time, "C" expanded its use at the expense of the other 2 until K was almost never used in full-written words. It was retained for some abreviations (as "K" for Caesar) and for a few words like "Kalendae".