what he is for
He is a switch rather than a shop. Find him standing outside the dungeon, talk to him after dark, and the curse option starts the Skeletron fight on the spot. In daylight he only tells you to come back later. He will also size you up and call you unready if your health and defense are thin, but the option stays open regardless, so treat that as advice rather than a lock.
the dungeon is open and still closed
Nothing stops you walking in through the front door before the fight. What stops you is depth. Drop below the level of the entrance and Dungeon Guardians appear, and they will end essentially any character that touches them at that stage of a run. The entrance hall is yours to loot and everything under it is not, which catches out people who assume the place is merely a hard biome rather than a locked one.
nothing down there can touch him
Enemies cannot damage him and he will not fight back, which makes him unique among the friendly cast. He does run away from things, he simply cannot lose that argument. The world can still kill him: lava, dart traps with their debuffs attached, boulders, explosives and suffocation all apply, though he cannot drown. If he dies, or if the boss beats you, he is back at his post the following morning, and he can pop into existence right in front of you rather than politely off screen.
after the fight
Summoning the boss kills him, and beating the boss frees him. He walks into town as the Clothier as soon as there is an empty house waiting, which is the tidiest piece of storytelling in the game: the cursed man at the door and the tailor selling you costumes are the same person. That win is also what makes the dungeon safe to descend, so both halves of the reward land together.
odd details
He has no map marker, so you have to remember where the entrance was rather than looking it up. Other residents will wander over and emote at him, which nobody else living outside a town gets. Shimmer changes his appearance and nothing else, and the result looks a lot like the Clothier's own shimmered form.

