Though we have been using DOCX as a file extension for a long time, we never cared why this change of tile extension from DOC. Here is the explanation.
DOC prior to 2007 Office applications, used to be a binary format on Word could read and understand. Client applications needed to use the applications' API to manipulate the content of any of such files and even a small bit of information could have corrupted the entire file.
DOCX was introduced as an open standard file which is targeted to be available for many applications without much effort. DOCX file is nothing but a zip format file which contains the contents in terms of XML files.
.NET Framework 3.0 provides API as part of WindowsBase.dll namespace, to manipulate such files programatically. Since, WSS and MOSS 2007 pretty much depend on .NET Framework 3.0, this namespace is always available for SharePoint developers.