Lets put Demacia's view of mages in a different narrative:
Let's say that who they prosecute are thiefs.
Once upon a time, they lost their prosperity and valuables to a group of thiefs that also wanted to kill them so they ran away and founded a city to call it their home. Fast forward to today and every thief (no matter how big or small they are), is prosecuted and sentenced to life imprisonment or death, if you're resisting the "will of the King".
There are some thiefs that simply love to steal but don't leave any casualties.
Some people love to steal, r**e and kill after they're done.
Some people only resort to stealing as a last resort, if they're so poor that the tomorrow for them is an uncertainty. It's either steal or die of hunger.
The problem with Demacia is that they don't make this distinction.
If they kill a thief that loves to kill others and leaves as much collateral damage as possible, that's great. But if they kill a person who only resorted to stealing because it was a life or death situation, no problem there either. It doesn't matter in their eyes if there's a good reason for you resorting to such an action once - to them you're guilty and you will be judged accordingly.
Being a thief is a choice you make in life.
Sometimes it's the only choice if you are to survive in a harsh world of Runeterra.
Being a mage, on the other hand, isn't a choice.
You're either born as a magic wielder or you aren't. But there are still other ways of using magic, whether this is by using Hextech, use of Petricite or powerful Artefacts such as Ezreal's Shuriman gauntlet or Sivir's crossblade.
Prosecuting people based on their magical lineage just because in the past, very different (but magical people) did you a frighten doesn't excuse senseless killing in the name of justice. In fact, Xayah's and Rakan's story is very much about them infiltrating a Demacian prison to liberate their Vastayan bretheren. And knowing how Xayah is a rebel, she does not take kindly to humans destroying magical leylines that are vital to the survival of Vastaya and their connection to magic altogether.
Demacians are known to abhor everything magical in origin while they aren't the only problem - Zed's Order of the Shadow wants this raw magic for himself to spread his influence and corrupt it with the forbidden technique of the shadows. Noxians are all the more happier to use magic in order to conquer more territories in the glorious name of Noxus and we've already seen just how far they are willing to go in Ionia to get what they want.
Demacians aren't the good guys here.
Their city is donned in white and gold which is symbolism for purity, equality and justice for all and yet, because of their troubled past with mages, Demacians treating any "mage" as a potential evil in hiding - is the reason why their idealism is stained in blood of the innocent.
The only reason Sylas was of use to them is because of his unique ability to detect magic with his sight. So he could potentially point out a "threat" way before the Mageseekers woudl've gotten close to the people they're supposed to "weed out", making their job less riskier by having the gift of foresight (thanks to Sylas).
Sylas also didn't have any kind of a life in the service of the Mageseekers.
He wasn't allowed to talk to anyone but his handlers, Vannis and Marsino.
His only wish was for him to be accepted as a Mageseeker for his good service once he was of age to serve. That was a lie he would tell himself to keep him warm at night, knowing full well that what they do is wrong. He saw it firsthand.
He witnessed the death of Marsino at the hands of a magical curse, from a mage that dared to use his gifts to make ends meet for his village and hurt no one else in the process. He witnessed the hypocrisy of Vannis to use the magical herb to help Marsino with the pain from the curse, which was the reason why they torched the village, only to kill a single mage that only defended himself. Then after his death, Vaniss' madness and grief for a fallen friend put two more innocent lives on the line (and even Sylas') because his hate towards the mages cannot be quenched.
Sylas realized the truth to Demacia - the city may be a beautiful to behold but for mages, it's a death sentence waiting to be exercised.