Did ancient humans invent clothing in response to losing their fur, or did they lose their fur because they didn't need it anymore after inventing clothing?
This is probably better suited to /r/AskAnthropology as the loss of body hair predates written records by many tens of thousands of years. While you’re waiting for a quality answer here, you may want to give them a shot at it as well.