Each OS has its own API. It relates to the GUI in particular. When companies plan to design, implement, and ship desktop applications, they should decide what platform to focus on. A team of developers working on one platform will spend almost the same amount of time writing the same application for the other platform. The biggest reason for this is the different approaches and APIs provided by OS. The complexity of the API may also play a big role in implementing applications on time. For example, the following snippet from the official documentation shows how to create a button in Windows using C++:
HWND hwndButton = CreateWindow(
L"BUTTON", // Predefined class; Unicode assumed
L"OK", // Button text
WS_TABSTOP | WS_VISIBLE | WS_CHILD | BS_DEFPUSHBUTTON, // Styles
10, // x position
10...