What's the purpose of registering a window class via WNDCLASSEX and RegisterClassEx() when creating a window in a Windows API application?
The separation of window attributes into CreateWindow() stuff and RegisterClass() stuff was done early on to enable the creation of uniformly-behaving windows. Dialog controls (buttons, listboxes, etc.) are a prime example - they all share a class. That means - they share a window procedure, that means - they share painting logic, input reactions, custom messages, notifications, etc.
On the app level, the most typical case when you have many windows of the same class is documents within a multiple-document interface. Sometimes people introduce app-specific controls. So the distinction serves its purpose.