What is a Bylaw?
The "by" in Bylaw is an old Norse word that means "Town." A bylaw is simply a Town, or local, law.
Canadian municipalities don't have constitutional status of their own, so they can only pass laws authorized by other levels of government. Statutes like the Municipal Government Act and the Traffic Safety Act delegate authority for local bylaws. The "whereas" clause you see at the beginning of bylaws usually explains where the authority for the bylaw is coming from.
Some bylaws are mandatory. For example, every municipality in Alberta must pass a Land Use Bylaw. Some bylaws are required only if a municipality wants to carry out a certain type of activity. A Town doesn't have to require business licensing, for example, but if they do, they need a bylaw. Bylaws can also customize provincial statutes to allow for local enforcement or reduced fines in areas like traffic safety.