Here's the breakdown of its origin:
* "Floor it" is the older and more direct expression. It originated in the early days of automobiles, when drivers would literally push the gas pedal all the way down to the floorboard to get maximum acceleration.
* "Pedal to the metal" is a more recent variation that emphasizes the action of pressing the pedal. While the "metal" part doesn't directly refer to the material of the pedal, it reinforces the image of pushing the pedal as far as it will go.
The idiom is used to describe driving at high speed, often in a reckless or urgent manner. It can also be used metaphorically to describe any situation where someone is putting in maximum effort or going all out.
So, the idiom "pedal to the metal" is a combination of the literal action of driving and the metaphorical meaning of going full speed ahead.