This question is a bit silly, I know. As an author my base motivation here is stylistic preference and a shameless attempt to evoke a flavor of golden era setting of so many great adventure and mystery stories.
But I'd still like to have something to offer my readers that might make this a little easier to swallow. What social and/or environmental factors could logically lead to the fedora being considered both fashionable and practical for the common man on a distant colonized planet?
In the past 80 years humans have colonized a newly discovered planet. The atmosphere is too nitrogen-saturated to be breathable by humans but otherwise it is quite a paradise, with native flora and fauna and breathtaking scenery, yada yada. Most people live in one of a handful of domed cities or in smaller habitat-based settlements; workers who must spend time outside where rebreathers. The atmosphere is thick and often hazy with dust and other particulate matter despite relatively high humidity in many settled areas.
My protag in particular (the target of my haberdashiery intentions) is effectively a truck driver; he pilots high speed shipping transports between settlements, so he spends considerable time outside the habitats but not much time actually out in the environment. Nevertheless he and many other of his fellow blue-collars would feel quite undressed without their headgear.
The fedora being such an iconic and powerful image for evoking setting atmosphere as I mentioned above, it's no surprise that we frequently see it used in futurist fiction, for example, in the noir-themed elements of the show The Expanse. And it's not an unreasonable proposition. Obviously many people in our modern time DO wear hats for social and/or fashion reasons, and from a style perspective, the fedora is arguably just as likely to evolve naturally into common use again as it is to fade away entirely.
But for sci-fi readers as discriminating as I myself tend to be, the contrived use of the hat may not be forgiven without offering SOME subtle answer to the question, "Yes but why else?" :)