Code Lyoko Season 1: 26 episodes Code Lyoko Season 2: 26 episodes Code Lyoko Season 3: 13 episodes Code Lyoko Season 4: 30 episodes What did seasons 1, 2, and 4 have that 3 didn't?
They realised that they were making a bad show so they put less effort into production, in the hopes that people would stop watching, but they were told they had to continue on as normal, and so season 4 was the same as 1 and 2.
More episodes were being made because they needed to get more viewers. More viewers=more money for production. Season 3 was probably only 13 episodes because they thought they had enough money for smaller seasons, but it was probably a mistake, so they had to have more episodes for season 4.