The problem with piece work (in an agricultural context, at least) is that is reveals a wide discrepancy in productivity between workers. The most productive workers are usually about 8x as productive as the average. Employers balk at the prospect of paying that much extra, so they create various kinds of mixed schemes that cap the worker's pay regardless of how much actual work they do. So the practical result of piece work is simply to punish below-average workers, without actually doing anything to incentivize above-average work.
I've worked jobs with such a disparity. For a govt census job, the top two workers out of 20 visited 3x the dwellings per hour and had a ~4x success rate per dwelling compared to the average, so they were literally doing as much as the other 18 employees.
They've almost certainly been just nicer people who people liked to communicate better. Like, young pretty girls with pleasant voice. And they knew how to build right approach to people. That's it, and it can't be trained.
I'd guess no matter the original context, once you're being 8x more effective than your colleagues, it's due to some kind of engineering. So in agriculture, your 8x hay mower is the one who's built himself a scythe instead of using a hand knife.
It's bad for the same reason all short-sighted goals are bad. You can't repeatedly institutionalize short term goals over long term goals without suffering long term failure.
Sometimes people produce less for reasons that are actually very important. This should be doubly clear in software, where "line of code" are not an accurate measure of successful work.
I don't understand the down votes and all these answers.
If I'm paying strictly for pieces produced (e.g. apples picked, widgets assembled) why would I balk at paying you for all of them if you're capable of 8X the average. I'm not losing anything.
Hell, I should be studying you to see how you're so efficient and apply that to my production (assuming you're not Superman hiding out).
Of course, that's not the same as cranking up the line speed at a dangerous job to crank out more widgets at the cost of more injuries.
It's not bad for the employer to get 8x as much out; it's bad for the employer to pay 8x as much, when they could pay (say) 3x as much and keep the other 5x as profit.
Doubly so if the easily measurable increase in quantity could be achieved at the expense of other qualities that are much more difficult to put in indisputable numbers.
That guy who closes tickets faster than anybody else at the company, but does so by crapping all over the code, he's being discussed all the time here on hacker news.