If, for instance, you have a Librarian villager offering an 'Infinity I' enchanted book for a book and 31 emeralds, once the chunks are unloaded, the requested emeralds will disappear and thus, you will be able to trade books for Infinity I without emeralds / second requested item.
Duplicate of MC-29498 - If you have not, please use the search function in the future, to see if your bug has already been submitted. If you could not find the original report, please comment with the keywords you searched for.