'Cause ASP.NET uses inheritance in web-page model.
Example I have a ASP.NET page named A.aspx, which has a code-behind file named A.aspx.cs. Class A inherits a basic set of functionality from Page class. When class A is compiled, it will be merged with some extra code (with control declarations) automatically. Then the ASP.NET compiler wil create one more class for the actuall .aspx page. This class inherits from your custom code-behind class.