The bug
If the player is holding a villager_spawn_egg that has !entity_data, or entity_data.id is set to something other than villager, the player cannot talk to or trade with a villager.
Note that any spawn egg that has entity_data.id set to villager correctly spawns a baby villager when used on a villager.
How to reproduce
/give @p villager_spawn_egg[!entity_data]/give @p villager_spawn_egg[entity_data={id:"cow"}]Hold either item and interact with an employed villager
Expected results
The trading interface should appear
Observed results
Nothing happens
Notes
This has the same cause (but separate code) as MC-215831 – both mobs have obsolete code that is intended to allow spawn eggs to work for spawning baby villagers. But spawning baby villagers works correctly regardless of the presence of this item check, so all it does is block inert or modified villager spawn eggs from falling back to the normal interaction.
Can confirm