When either bringing a villager into range of a workstation, even one that is already in use by another villager, the new villager automatically sets profession and that profession gets locked. If you place a block in front of a blank villager, the same thing will happen they will change to the profession of the block then will not reset back to a blank villager after removing the block. This all happens regardless of the time of day in minecraft.
Villagers end up sharing workstations, for example there is a librarian with a locked trade,another villager walks near him and is now a librarian.
this is a issue with both natural, bred and spawned villagers.