This is mainly due to how C handles struct types. Things work slightly different in C++, which is why you don't see this pattern as often anymore.
Mind you that DirectX is a COM-API and as such is specified in terms of C, even though it uses objects and classes.
The first mention of DXGI_SAMPLE_DESC
is the tag name, the second is the name of the typedef.
Omitting the tag name has the main drawback that it prevents the type from being forward-declared. There is also a number of technical reasons related to how Microsoft's toolchain generates code for COM interfaces why you would not want to skip the tag name.
Omitting the typedef on the other hand would force you to write struct DXGI_SAMPLE_DESC
instead of plain DXGI_SAMPLE_DESC
whenever you use the type in C code.
The *LPDXGI_SAMPLE_DESC
is a second typedef that refers to a pointer to DXGI_SAMPLE_DESC
instead of the plain struct type itself. This is standard typedef syntax that is still the same in C++.