The reason golf clubs are progressively shorter when measuring from driver to putter is due to a combination of factors, each is detailed below.
One of the main reasons golf clubs are different lengths has do with club loft. The wedges and shorter irons have a high amount of loft and therefore hit the ball higher than the longer irons and woods. Because of the extra back spin created by high amounts of loft, these clubs are best utilized for shorter controlled shots. For more control over any given shot, it is better to have a short shaft. The combination of a short shaft, which limits the amount of width and power generated during the swing, and a high amount of loft enables a player to hit the ball high with control.
The mid and long irons are also lofted clubs but are designed to progressively propel the ball further distances. To hit the ball further, clubs are designed to have a combination of both lower loft and more length. The lower loft will send the ball lower with less back spin, however to increase the distance, the club shaft needs to be longer, enabling more club head speed to be generated through the ball.
This is why the longest club in the bag, the driver, has the least amount of loft and can send the ball the furthest possible distance.
As well as having progressive loft angles, golf clubs also have progressive lie angles. The lie angle is the angle created between the club shaft and the bottom edge of the club. High lofted irons which have shorter shafts also have a greater degree of lie angle. This is because a shorter shaft brings a player closer to the ball and the shaft more vertical in relation to the ground. The less loft an iron has, the longer the shaft will be, therefore the lie angle will be less. The lie angle is important because it has a direct effect on how the club will react with the ground at impact and also where the club face is pointing at address and impact.
The shortest club in the bag, if using a standard design (not a belly or broom handle), is the putter. This means the player using the putter can safely assume it’s the most controllable club to use. Because of its purpose, to roll a ball along a green, it has almost no loft. The putter is the exception to the rule.