Yes, I do the same. When I develop stuff, I tend to move quick and break things, which might involve swearing in git commit messages or just being plain stupid. I also have a habit of commiting sensitive information like host names, passwords or API-keys to private github repos, thinking not much about it.
If you take your scratch project to opensource, you typically don't have the time to make sure not only the current version, but also every intermediate result is free of flaws someone else might dig up.
So: mv private opensource; git init; git remote add ...; git push
An artist also wouldn't hang every draft drawing beside his gallery piece...