I finally got my villagers to breed by giving them food, and was happy to see some new ones with no profession. I really wanted some good enchantments so I put down a lectern next to one as he walked by. He immediately turned into a librarian. Hooray!
I was busy doing something and when I finished I went looking for him. I found a brand new librarian with a book of mending! I purchased 4 of the books before my gems ran out. I spent the next day earning gems to trade for some more books, but the librarian was nowhere to be found. I found a couple of new librarians with enchantments that didn't really interest me (Knockdown I, Quick Charge 1), but my dear villager with the book of mending had disappeared. I hoped he was just hiding and that he would turn up later, but several days have passed and he appears to be gone for good.
All of a sudden it hit me: I had placed the lectern on the grass in the middle of the village and later moved it into a nice house. If it was the lectern that belonged to the mending librarian, I must have removed his profession inadvertently when I removed the lectern, and when I placed it somewhere else, the now jobless villager became a librarian again with different trades.
Does this sound plausible? If so, I hope reading about my stupidity will help prevent someone else from making the same mistake.
On the other hand, if I move some more lecterns, I may be able to get rid of some of the librarians who have less desirable trades and create new ones that are better. Has anyone tried that?
It does happen. I also destroyed a lectern to move it. I saw my Librarian villager change to a Priest (I placed a stonecutter, a barrel, and a brewing stand in the house). When I placed the lectern in a different spot, she became a Librarian again, but with different trades. I was disappointed and didn't even think about using this to obtain better trades. That's a good idea.