So judges are only there to apply the will of the people.
Firstly, you confuse "will of the people" with laws.
There are laws legislators make, that are often or atleast sometimes unconstitutional, that are routinely challenged in court and struck down.
Secondly, you oversimplify what judges do.
Judges
interpret laws, resolve ambiguities while ensuring laws conform to the charter.
They don't just blindly "apply the law".
If a majority want mandatory sentences, that is the law.
Argumentum ad Populum.
Nope.
Majoritarianism is not democracy and majority opinion doesn’t automatically make something just or constitutional, and therefore never implemented.
Example: If a majority “wanted” to ban a religion or strip rights from an accused person, your argument would justify doing so. However that would violate charter rights and the courts would rule otherwise.