Being paid by what the truck makes

I used to plan for a company who paid on this basis, as recently as 2001-2002. There was some kind of get-out clause to make it legal, I can’t rememebr exactly how that worked. I was never comfortable planning like that, and the aggro off the drivers was unbelievable, because they all knew what each other earnt the previous week. You soon get fed up of trying to justify why a certain driver got a certain job.
I certainly used to play fair, and declare everything the truck had earnt, but I can easily see how drivers could be hoodwinked