It might be custom fitted or elastic

i dont know, i think it has to do with since he was raised as a kokiri, they resemble elves, and elves wear clothing (hats, tunics, etc.) such as the one he wears, that is where it comes from or at least that is my theory