Some content management systems strip the HTML comments out of the page content before sending it to the browser. This allows the page author to document their code as much as they like without slowing the download by actually sending all the comments to the browser. When a CMS that does this encounters a script enclosed in an HTML comment like this it strips it from the page before sending the HTML to the browser. This is therefore a useful way to comment out scripts when using a CMS. When used this way the script tag would be completely empty if you view the page source in a browser. If you come across web pages where the script is visible in the source it means that the person who wrote the script has only partly updated the wrapper and doesn't properly understand the content of this page.
This wrapper indicates that the page is written in HTML but that the page is being validated as if it were XHTML. The commented CDATA tag is there simply to tell the validator to treat the content of the script as CDATA. HTML treats it as CDATA anyway and so does not need the tag there to identify it as such.
If you see script tags that look like this then it means that you are looking at code on the server and that the script tag is identifying the server side language that the script contained inside the tag is written in (in this example PHP). These scripts will be processed entirely on the server and the script tag will not be included in the HTML delivered to the web page.
This article written by Stephen Chapman, Felgall Pty Ltd.