Windows SharePoint Services uses number of templates to create site or site pages and can be applied to any site, page, web part page, lists, areas and quotas. By default, templates are stored in the Program Files\Common Files\Microsoft Shared\Web Server Extensions\60\templates directory on the local file system of the front-end Web server. The use of templates saves database space and increases performance in Windows SharePoint Services.
Saving Database Space
Windows SharePoint services does not store all the data about sites and pages in database but infect saves a row representing a site with the template of the site. When users changes the site the changes are stored in database. When user request the page again SharePoint services loads the page from template but load the changes from the database and shows to the user. This way Windows SharePoint Services saves database space
ASP.Net pages normally converted to DLL in web server. Templates have only one DLL associated with them but not for each site they represent which result if performance increase.
The Effects of Customization
Once a template page is changed. Windows SharePoint Services does not load the template from the table instead it saves the whole copy of the page to the page table.