If you study Spanish long enough, you will soon realise that the pronunciation of Z and C (before e and i) is not the same in all Spanish dialects. Z and C (before e and i) are pronounced something like the English “th” in most dialects of European Spanish.
In Spanish dialectology, the terms distinción, seseo, and ceceo are used to describe the opposition between dialects that distinguish the phonemes /θ/ and /s/ (distinción). And those that exhibit merger of the two sounds (neutralización) into either /s/ (seseo) or /θ/ (ceceo).
Some dialects of Spanish distinguish the two sounds. Therefore, some pronounce words like casa and caza differently. Seseo is typical of the American, Canarian and most dialects of Andalusia, whereas distinción is typical of most dialects in Spain.
Legend has it the phenomenon of distinción can be traced back to a Spanish king who spoke with a lisp. But this is just a legend. By the 15th century, the Spanish language had developed a large number of sibilant phonemes. During the 16th and early 17th centuries these phonemes merged differently in different areas of the country. They evolved into those of the different modern dialects.
Medieval Spanish had four sounds that were so close to one another. People used to get confused quite often, so eventually these sounds were simplified. The northern part of Spain reduced the system to two sounds: “s” and “th”. While most of the south of Spain reduced all four sounds to just “s”. When Christopher Columbus departed to South America, most of his crew were from Southern Spain, therefore, they pronounced Z as S.