They seem to be totally random. I have created an account on Disney.com, given them my email address etc....no pin code for me. Disney visa card holders may be a source also....
Don't feel too deprived. I got an email code from Disney (don't know how that happened) that actually included dates we are going, but the discount was not very good and the rates on the general public codes were much better!