You specify the encoding in the prolog of an XML document so that the XML parser will be able to determine the encoding of the document. Most operating systems have no way for a user to determine what encoding was used to create a file, so XML requires the creator of the file to do that.
Now the name you put in the "encoding" attribute should be the actual encoding of the file. If you change it to something else then you would be lying to the XML parser and it would misinterpret the data in the document. This might cause it to throw an exception or it might cause it to garble the data in the document. And if it isn't already obvious, changing the "encoding" attribute doesn't change the actual encoding of the file.
However if all of the data in the document is plain US-ASCII characters, then US-ASCII and ISO-8859-1 and UTF-8 versions of the document will all look identical, because they all encode US-ASCII characters in the same way. But UTF-16 encodes them in a completely different way.
You should read this tutorial to learn more about Unicode in the context of XML.