The bug
If villagers pick up wheat in different mounts in separate stacks, even though they have enough wheat to craft bread, they don't realize that.
This causes villagers to fill up their inventory, making them unable to keep collect anymore crops, and since its inventory can fill up of non food items (wheat), at some point villagers wont be able to reproduce.
How to reproduce
Summon villager
Throw him 2 wheat in a single stack. Wait until it picks up the bread.
Throw him 1 wheat in another stack
Do
/data
and take a look at the inventory tag
Notice that two different slots have wheat inside them, one with 2, and the other with 1.
This happens since 1.14.
Update: As pointed out by Pelle Reinke, it no longer happens with farmer villagers but any but them. Reproduction steps might have been changed since this steps where provided.
I did some testing in 1.16.2 and it appears that only the farmer type villager will craft the wheat into bread. It made no diffrence if the wheat were given in first a stack of 2 and then 1 or all 3 pieces at once. The farmer would craft it into bread.
Non-farmer villagers will happily pick up wheat but not use it to craft bread themselves, instead they will share the wheat with any farmer they meet.
But the non-farmer villager will keep a minimum of 24 wheat in its own inventory which is weird when it does not craft it into bread.