Re licensed vs unlicensed or homeowner I do not believe any laws would be impinged if basic construction laws are adhered to.
I know that some municipalities require inspections of components of work and also reserve specific items for licensed workers.
Generally things like connecting appliances to gas lines, tapping municipal water and waste lines and also electrical feed.
I can see the need for that (public and worker safety).