Here's what the C standard has to say about it:
The source file, along with all the headers and source files included in the preprocessing directive #include , is known as the preprocessing translation unit. After pre-processing, a pre-processing translation unit is called a translation unit. [..] Previously translated translation units can be stored individually or in libraries. Individual program translation units bind (for example) function calls, whose identifiers have an external connection, manipulating objects, whose identifiers have an external connection, or manipulating data files. Translation units can be translated separately, and then associated with the creation of an executable program.
(Source: Draft Standard C99, 5.1.1.1 §1)
So, in both cases, you have two translation units. One of them comes from preprocessing the main.c compiler and everything that is included in the #include & mdash directives, that is, sub.h and, possibly, <stdio.h> and other headers. The second comes from a compiler that does the same with sub.c
The difference from your first to your second example is that in the latter you explicitly save “different translated translation units” as object files.
Note that there is no rule linking one object file with any number of translation units. The GNU component is one example of a linker that can combine two .o files .
The standard, as far as I know, does not indicate the extension of the source files. However, in practical aspects, you can use the #include a .c file for free in another or put your entire program in a .h file. With gcc you can use the -xc option to force the .h file to be considered the starting point of a translation unit.
The difference made here:
The source file, along with all the headers and source files included in the preprocessing directive #include [...]
is that the header should not be the source file. Similarly, the contents of <...> in the #include directive should not be a valid file name. How exactly the compiler uses named headers <...> and "..." is determined by the implementation.