The story
From diaper + bucket, due to a common design of a diaper pail (especially but not exclusively ones intended for cloth diapers) resembling the shape of a bucket with a handle for ease of transportation.
Etymology from Wiktionary, CC BY-SA 4.0.