I wonder how that would happen by accident, seems super specific
It's because the game has a concept of individual items, as well as "Categories", and there are also universally liked items and categories, and there is an order it checks those groups in to determine if an NPC likes a gift or not. That order accidentally got changed in 1.4