The idea was precisely that the fire would expose the witch at the stake!
The burning clothes falling down and completely exposing the victim - at least above and between the flames - while the victim screamed in pain and panic. This was even more spectacular for the observer than the witch being naked from the start.
In the case of Joan of Arc, the express intention while burning at the stake was to prove that she was really a woman: After her long penitential robe was set ablaze, the fire was deliberately held back in order to present her naked to the people - according to eyewitnesses.
Here is a beautiful vision of burning at the stake - it shows the witch after her clothes were burned...
View attachment 1497319