The newer versions of the servlet spec use .xsd files with no further information on the id attribute, but if you go back to the older versions with .dtd, such as web_app_2_2.dtd, you find:
The ID mechanism is to allow tools to
easily make tool-specific references
to the elements of the deployment
descriptor. This allows tools that
produce additional deployment
information (i.e information beyond
the standard deployment descriptor
information) to store the non-standard
information in a separate file, and
easily refer from these tools-specific
files to the information in the
standard web-app deployment
descriptor.
For example, WebSphere Application Server used the id mechanism in its old bnd and ext files:
web.xml:
<web-app id="WebApp_ID" ...
ibm-web-app-bnd.xmi:
<webappbnd:WebAppBinding ...
<webapp href="WEB-INF/web.xml#WebApp_ID"/>
(Thankfully, this is tool-friendly-but-developer-annoying use of id attributes is no longer necessary with the newer .xml file format for ibm-web-bnd/ext, but I digress.)