Dean produced a woolen hat, which Harry placed carefully upon Dobby’s head, muffling his batlike ears.
Seriously? How could he do something like that? Hermione had to knit them!! If wizards could produce clothes why did Lupin have old clothes? Why did they have shops for clothes? And also Ron didn't try and conjure shoes, he gave him his own.
Ron sat on the edge of the grave and stripped off his shoes and socks, which he placed upon the elf’s bare feet.
(I also remember firecrackers at Hogwarts could produce hats but this could be explained simply because the cracker already had the materials inside it, and crafted the gift it produced randomly each time. It could also, for example, increase magically the quantities of some materials.)
Rowling must get some facts together and stop contradicting herself. If anyone has a logical explanation please share it but I think it's a plot-hole.