Puttees are Indian in origin, from the Marattas. and were worn to protect a horseman's calves from pinching by the stirrup leathers. The British adopted them, together with the baggy Maratta trousers, called jodphurs. The British soon adopted jackboots to replace the puttees.
The more or less original version was often used by infantry, to keep mud, rocks, etc., out of their boots. The US Army used them in WWII, but adopted canvas leggins later as being more practical.
Interestingly enough, officers and cavalry wore leather leggins in lieu of jackboots. The boots only came to the ankle, and the leggins stretched from ankle to knee, being held in place by a spiral strap.
Today, many armored types wear "tanker boots" with a similar spiral strap and tell strange stories about why that style is used -- but it's an imitation of cavalry leather leggins.