When students take civics classes in Canada, they generally learn something along these lines: in Canada, we have three levels of government; the leader of the federal government is called the Prime Minister; the leaders of provincial and territorial governments are called Premiers; and, the leaders of local governments are called Mayors.
What this fails to capture is that one of these things is not like the others (let alone that this description also omits Indigenous governments ...).
Mayors have a very different job than do prime ministers and premiers - and this is due in large part to the fact that municipalities are quite different from federal and provincial governments: municipalities generally have no separate legislative and executive branches; there is typically no "government" or official opposition; in most cases, there are no political parties (and even where local political parties are present, they are different from federal and provincial parties); there is no cabinet or similar concept to ministerial responsibility, where individual politicians have executive power over specific government services and policies; there is no separation between a head of state and head of government; there is no presence of the Crown at the local level; the expectations for openness and transparency are much higher.
I could go on.
As a result, the job of a mayor is very unique. The mayor must work with multiple groups - the elected council; officials from other governments with a stake in local issues; the municipal administration; the administration of other local bodies and sometimes community organizations; community groups and individuals; sometimes a local political party - but has no formal, legal power over any of them. As a result, mayors have to rely on other forms of power in order to get things done.
It's a very different kind of job, and requires a different kind of leader.