There is no in-universe explanation, and the honest answer is that it is a design decision rather than a plot point.
Sonic's gloves come off in the Werehog form largely so the character's hands read clearly during the slower, more physical combat sections, while the shoes are part of his silhouette in every form and would be a much stranger thing to remove. The original answer's joke about the Sonic Team being a bunch of prudes is one reading; the simpler one is that artists keep the elements that identify the character and drop the ones that get in the way of animation.