How is the weather in that part ?
Foxes are typically considered to be fairly smart animals, so it’s unsurprising that they can accomplish some unusual feats. However, climbing onto the top of someone’s home is not something they do on a regular basis.
We’re not sure what this fox was trying to do or why it chose to do so, but it appears unconcerned with its condition, so we’re thinking it meant to go up there for some purpose.