Villagers in a naturally generated village keep walking off edges and taking fall damage. This makes them increase their prices. As far as I know, all mobs are supposed to avoid walking off drops higher than 3 blocks.
Here's a video of it happening when I was trying to trade.
Duplicate of MC-151810. Feel free to add your video to that report.