It doesn't change the legitimacy of writing that work, and raises questions about your intent. ("Willful infringement" carries much stiffer penalties than just infringement.)

Furthermore a body of open source work is taken by many companies to be a positive characteristic. That is far from all, but then again it is a filter for places that you would want to work at. Releasing that code anonymously loses that benefit.

Cheers,
Ben