In my world, the only villagers I can trade with are the ones that are in villages. I cured a zombie villager... he offers no trades. I made a villager farm... the babies grow up and offer no trades. I used an egg (in survival mode) to create villagers... no trades. When I use a villager egg in creative mode... they offer trades.
Environment
Ryzen 2600, 16gb DDR4 3200MHz, WD 1TB M.2 SSD, Win10Pro, Gigabyte GTX 1070 Gaming G1 and GTX 1070 Mini, 3TB and 4TB data HDDs, ASUS DVD-RW.
seems that newly spawned villagers are "blank" (at least, in cases where the map was generated before version 18w50a; and loaded in the 18w50a version)
seems to be a duplicate of this:
https://bugs.mojang.com/browse/MC-140926