I use it as a hybrid of that I guess: I prompt some simple tool into existence, iterate a bit, then I look at the code, am very dismayed and spend more time than it might have taken me to build from scratch to refactor it.
It solves a huge motivation problem for me though, because having a working prototype of something I want is a lot. Especially when it's something I never did, where I cannot imagine the end result fully, or estimate my own ability to get there. But if I can see the thing in action, while I may look at the code (and my own skills) and realise it would take me months to make it something I could share with others, I at least know there is a destination.
Not to mention how it surfaces all sorts of issues I didn't think of, so I'm basically prototyping v2 before I ever fully built v1, and so on, until it kinda settles.
I guess I'm lucky I don't do it professionally :P