DCGAN is initialized with random weights, so a random code plugged into your network would make a very random picture. On the other hand, as you may think, the network has countless parameters that we could tweak, and the purpose is to locate a setting of those parameters which makes samples generated from random codes appear like the training