As shown in the video it’s highly exploitable and you might as well just give all the villagers the best trades by default, all librarians should just come with mending books for one emerald. It was the “intention” to make villager trading a bit more challenging? Now you don’t even have to get lucky to spawn the correct type of villager, any villager can be selected to become whatever job you want, then just break and remove their job that you pick until they start with the most desirable items.
Note: it also works on cactus by merely zero-tick plusing a piston beside the block you want to grow, to easily reproduce a zero tick condition all you need to do is put a button on the side of a piston and click it. The piston will start to extend, and pop the button off the piston which causes the piston to retract in the same tick.
http://prntscr.com/oqjdy0 You can just spam right click with buttons in hand and watch the cacti grow in the setup above