This is an excellent example of a Rube Goldberg Machine. A Rube Goldberg machine or device is any exceedingly complex apparatus that performs a very simple task in a very indirect and convoluted way.
I first saw this on the TV program homemade but the original video is at: www.baynhamtyers.com (in the videos section). There are another couple of contraptions too, so it’s well worth checking out.
My favorite is shown below: