At one point in his book on laughter, Henri Bergson argues that humor in many cases arises from what he calls “mechanical inelasticity”, which he describes as a kind of “physical obstinancy.” This hindrance, according to Bergson, appears suddenly and in two separate forms: natural, such as someone tripping and falling or slipping, and artificial, someone falling as the result of a prank. He argues that we laugh at these instances due to their subversion of expectations and seeming spontaneity.
An excellent example of this is “The Hoser Hosed” which is a short film by the Lumiere brothers depicting a boy pranking a man with a hose. While the video is short and obviously staged, it is clearly meant to evoke the feeling that Bergson is describing to get laughs.
Contemporary “fail” videos are meant to produce the same effect but now it almost always spontaneous as opposed to “the Hoser Hosed” which was almost certainly staged. Despite the fact that the link leads to a ten minute compilation of fail videos, almost every single video emulates qualities described by Bergson.
For example, twenty seconds into the video, a car can be seen pulling a large rock by a rope attached to the bumper of the car. This immediately allows the audience to create a scenario in their mind for how this will work out, already preparing their expectations to be subverted. The rock then flies out of the ground and smashes the car’s rear windshield. Here, the “mechanical inelasticity” takes the form of both the car and the rock. The car was not the right choice for dealing with the rock, creating the “physical obstinancy” and leading to the comedy created by the rock smashing the car window.
 Bergson, Henri. Laughter: An Essay on the MEaning of the Comic. London, UK: Macmillan, 1911, p. 9.