It happens both ways. Manufacturers, if they apply, go to what's called a “WMI”, a world manufacturer identifier, which are the first three digits of a 17-digit VIN. Those identify who the manufacturer is.
In cases where the province has to assign a VIN—I'll use Alberta as an example—they have a WMI that's issued by Transport Canada for any VINs they issue. It's for a variety of things. Perhaps it's a home-built trailer or a vehicle that is amalgamated from three other vehicles, and currently the VIN that's on the vehicle no longer accurately describes what it is. There are circumstances in every province where it is necessary for a VIN to be issued by the province itself.