To gain a better understanding of why the one that's there is designed as it is. Sometimes there's legacy crap in the previous design thats no longer needed, or you have better materials, and can make the new one more elegant and functional. Sometimes it just gives you the opportunity to see all the failure modes that weren't obvious until you stuck your paper wheel in the place where a steel one had been.
This is one of the most common mistakes in software development: not appreciating that the true value of code is the knowledge embodied in it over time.
If reinventing the wheel implies no added benefit, the answer is never (or perhaps for educational reasons as someone else has suggested).
If you can identify a benefit, that needs to be weighed against the cost. A benefit may involve maintainability, flexibility, extendibility or any number of ibilities. But that is more like improving the wheel which is OK.
More control, different choices for tradeoffs, it's a decent way to get detailed knowledge, a reinvented wheel that only works for your specific company may be a better fit and simpler than a universal wheel.
Of course, there's plenty of ways to waste a lot of resources reinventing the wheel.