Going back and reformatting everything afterwards is not really a useful learning experience at all. It's reinforcing poor behavior (the idea that you'll "clean it up later," which is often impractical in the real world), and not teaching you how to have the mental discipline to either
(a) be consistent in your code hygiene practices as you develop or
(b) develop the tolerance for reading and navigating code that is not formatted in your current personal style of the month.
And it's mostly pointless, as others have noted: we have programs to do this for us, by choosing to manually reformat your code you're just wasting precious time.
Further, to your point about cleaning it up for eventual display in a portfolio... as employers who review code portfolios, we can usually tell that a piece of code has been overly sanitized. We want to see real code that is reflective of how you really work. Seeing that code in the state you will naturally write it is far more useful to us than seeing something you've taken and artificially cleaned up to fix every last minor style nit and document every last function extensively.
I would recommend you not do this in the future.